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

Requery Subform control from form control change

Status
Not open for further replies.

njwcad

Technical User
Oct 16, 2002
156
GB
Can you please help. I am trying to requery a control on a subform after a change of a control on the main form. The query works once when I make my first change (after opening of the form) but will not requery if change the control on the main form for a second time. I have tried macros such as Requery and runsql but they do not work or my referencing is incorrect. For example I have tried to requery the subform control after change on the main form but a message pops up saying it Access doesn't recognise the name of the contro on the currnet form. Perhaps my referencing is wrong

Thanks
 
PHV
Thanks for your help. However I have been trying for the last hour or so to reference this and the message goes something like "there is no field xxxxxxx in the current record" To explain further. I have a main form called "Raised PRS" and a subform called "Equipment Installs / Removals" with a control called "Equipment Type"

My reference in the Requery macro is
Forms![Raise PRS]![Equipment Installs / Removals].Form![Equipment Type]

I'm sure I'm probably missing something simple
 
How are ya njwcad . . .

From the mainform, try the following:
Code:
[blue]   [subFormName].Requery
or
   [subFormName].Form.Recalc[/blue]

Calvin.gif
See Ya! . . . . . .
 
PHV - Thanks for your help.
[Equipment Install / Removals]![Equipment Type].Requery works fine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top