Requery code

  • Thread starter Thread starter hootyeah
  • Start date Start date
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!
 
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.
 
Back
Top