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

Running queries called by macro through form

Status
Not open for further replies.

Bronte1226

Technical User
Oct 18, 2002
123
US
I am trying to set up a process through a macro to run when a field on a form is updated or changed. My problem arises when I am trying to force the query being called by the macro, triggered by the form to only append the current record. I tried adding criteria to the query: [Me]![Forms]![Work Order]![WO Number]
but that didn't work, it just asks for the WO number and even if I put it into the input box it still errors out. I set up an append query and an updated query to run when the macro is called by the form event. I must be missing a step or something. What am I doing wrong?
 
I'm not sure I fully understand all your steps, but it seems the reference within the query is incorrect. If you use ME to reference a control, you are meaning a control within the same item (in this case, the query). The FORMS collection is what you want to use instead. I think [Forms]![Work Order]![WO Number] would be the correct syntax.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top