Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wont requery

Status
Not open for further replies.

PCX

Technical User
Dec 17, 2000
54
US
I have a form that is a subform. When I make a change to the underlying query, and then go back to the subform, the change is not shown. If I manually click <shift> <f9> the form updates.

I tried to use this:
Me.Form![EmployeeID].Requery

I dont get an error but the form does not seem to requery

I think the correct format is:
Me![Unpaid Expenses].Form![Employee#].Requery

But this gives an error that it cant find the field.

The subform name is &quot;Unpaid Expenses&quot; and a field in the form is &quot;Employee#&quot;. All of this is inside a tabed form called &quot;ExpenseTabForm&quot;.

Any help is appreciated.

Thanks
 
Are you saying that these two lines of code (if they were working) essentially do the same thing?

Me.Form![EmployeeID].Requery
Me![Unpaid Expenses].Form![Employee#].Requery

Because in the first line I see that you are referring to the field EmployeeID and in the second line you are referring to Employee#...maybe you have a typo in the first line.
Also if the field EmployeeID is on the form you are trying to requery...
I believe that the proper syntax is

Me![fieldname].Requery

You may even have to declare a variable and set it equal to Me!fieldname
and then requery the variable. An example of this would be

Set somevariable = me![fieldname]
somevariable.Requery

I hope this helps.
Sera
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top