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

Append Qry Using Field from Form - proper syntax for form module 1

Status
Not open for further replies.

FrustratedPgmr

Programmer
Jul 29, 2002
17
0
0
US
I am trying to run an sql statement from the forms module that will append records into another table based on the current record in the form - not a combo box or list box. I did this in my regular access pgm - upsized it to ADP and have experienced problems with all my internal parms of this type. I know it is the syntax and have tried using the & as some of your answers have suggested.

the WHERE statement gives the syntax error.

WHERE copytotable.field = me!CurrentForm!CurrentFormField

What is the correct syntax for ADP Forms?

I joined yesterday and have already found 3 solutions to some of my problems. [Gorgeous]
 
I finally got the syntax correct and it works fine.

WHERE (Table.Field ='"&[Forms]![Formname]![Fieldname]&"')

This worked running a "docmd.runsql strSql " statement in the forms module for appending records from 2 joined tables into another table. [Reading]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top