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

Requery a combo box on current record

Status
Not open for further replies.

dawnd3

Instructor
Jul 1, 2001
1,153
0
0
US
Hi there, I have a combo box in a subform that is filtered dependent on a combo box in the main form. (this works fine) However, the values don't update when I switch records. I tried putting this code in the oncurrent event of the main form:

DoCmd.Requery (Forms!frmItemSub![cboPlan])

but it didn't work. Do I have the syntax correct to reference a field in a subform from a main form?

Dawn
 
You might try this
Forms!MainFormNameHere!frmItemSub![cboPlan].Requery
Paul


 
I tried that and also the following:

DoCmd.Requery Forms!frmPurchaseOrders!frmItemSub![cboPlan]

and

Me!frmItemSub!cboPlan.Requery

No luck! Anyone????

Thanks for your response

Dawn
 
Dawn

If you get this could you let me know as I am having the same issue.

Thanks

BusMgr
krspring76@hotmail.com
 
Try using the Requery command on the individual objects.
I have had some success that way.
Example:

TextBox1.Requery
Combox1.Requery

Put this code in the On_Change or After_Update commands in your form coding. You can Requery all or just some of your text controls this way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top