Requery Subform on Tab

A

Alan Z. Scharf

1. I have an Access 2003 frmMain with a tabMain control on it.

2. On tabMain, I have a page with sfrmUserActivity.

3. I want to requery this page's sfrmUserActivity with a pushbutton.

4. What is the syntax for referring to this subform on a tab for requerying?

I tried a few combinations, but couldn't get it.

Thanks.

Alan
 
T

tina

if the command button (pushbutton) is on the subform, use

Me.Requery

if the command button is on the main form, try

Me!SubformControlName.Form.Requery

note: make sure you're using the subform *control* name, which may be
different than the subform name. to be sure, open the main form in design
view. click once on the subform object to select it. in the Properties box,
Other tab, look at the Name property. that's the name of your subform
control.

hth
 
A

Alan Z. Scharf

Tina,

Thanks very much.

It was treating the subform as a Control that did the trick.

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top