Requery Subform on Tab

  • Thread starter Thread starter Alan Z. Scharf
  • Start date Start date
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
 
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
 
Tina,

Thanks very much.

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

Alan
 
Back
Top