Requery code

H

hootyeah

Hi

I have a combo box named "RoomCombo" inside subform "JobRoomDetails",
which sits inside main form "Jobs".

I am using the following code in the AfterUpdate property in a combo
box that I am wanting to requery "RoomCombo":

Forms!Jobs!JobRoomDetails.Form!RoomCombo.requery

but I get the error message: "MS Access cant find the field
'JobRoomDetails' referred to in your expression".

Im confused - from all the reading I have done this seems to be the
correct way.....

Please help!
 
D

Douglas J. Steele

When you add a subform to a form, a subform container control gets created
on the main form. If you do the addition by dragging one form onto the
other, the subform container will (usually) be named the same as the form
you dragged, however there are times when the subform container will be
named something else. (If you added the subform by selecting the Subform
Control from the toolbox, the subform container will not be named the same
as the form being used as the subform). Make sure that JobRoomDetails is the
name of the subform container. If it's not, use the subform container name,
not JobRoomDetails.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top