INSERT Statement....Help
INSERT Statement....Help
(OP)
The problem I am having is I'm using an Insert INTO Statement in one of the forms I have. The statement looks like: INSERT INTO table (information) Values (form!form_name!textbox); The problem is I cannot get the value of the textbox in the query. Does anyone know a solution or maybe even a better way of doing an INSERT. Thanks for your help
RE: INSERT Statement....Help
What you have looks good to me.
Dim strSQL as string
strSQL = "Insert Into [tablename] (field1,field2) Values (""" & Me![FormField1] & """, """ & Me![FormField2] & """"
... this is for two fields that are of the string data type.
strSQL = "Insert Into [tablename] (field1,field2) Values (""" & Me![FormField1] & """, " & Me![FormField2]
strSQL = strSQL &")"
...this one is a string followed by a number.
Gotta' embed the quotation marks for strings.
Good Luck !
Amiel
amielzz@netscape.net