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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery on subform not working - Error 2118 1

Status
Not open for further replies.

AlexMidd

Programmer
May 14, 2001
655
NL
I am trying to get a subform to requery after having enetred data into a pop-up form. I need certain data to be entered only when 1 category out of a number of categories has been chosen. The pop-up appears to prompt users to enter the data required. I want the form to close and then requery the subform. It won't let me do it and I get the following error. Any ideas?

Run-time error '2118':

You must save the current field before you run the Requery action.
Have fun! :eek:)

Alex Middleton
 
Hi!
Save updated record (docmd.RunCommand acCmdSaveRecord) before you requery subform or run requery command in procedure Form_AfterUpdate!

Aivars
 
Thanks, Aivars, that has done the trick.
Have fun! :eek:)

Alex Middleton
 
I am having the same issue, however all of the controls on my form are unbound. I use code to pull the values I want and I store them in the controls I want. I have a listbox that pulls values from a table and displays them, but I am getting the same error as Alex. Any ideas on how I can get around this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top