Updating Combox from Textbox - Requery

skilche1

Registered User.
Local time
Today, 03:33
Joined
Apr 29, 2003
Messages
226
I am having troubles working with Access '07 trying to requery a combobox on a subform [frmSupplyOrder] from a textbox on the main form [srfmSupplyOrder]. On one of my past databases, I have used "=RequeryControl()" in the OnGotFocus in combobox on the subform and it worked flawlessly. When I apply it to my new db, I get an error. I also added a pic of the form layout (note attachments).

I've searched everywhere for this solution, tried different scenarios and nothing seems to work. Anyone have any suggestions?

Thanks,

Steve
 

Attachments

  • =RequeryControl()_error.jpg
    =RequeryControl()_error.jpg
    62.4 KB · Views: 99
  • supplier.jpg
    supplier.jpg
    34.7 KB · Views: 98
Last edited:
You would need this function

RequeryControl()

to be in the database to work. If you don't have it you can just use

Me.frmSupplyOrder.Form.Requery

in the VBA window (not the property)

(if frmSupplyOrder is the name of your subform container control on the main form. Remember the container that houses the subform needs to be referenced, not the subform)
 

Users who are viewing this thread

Back
Top Bottom