D
DS
I have this statement that is puzzling me. I'm inserting into a Table,
the fields are Text Fields, the values are coming from an unbound textbox.
Normally I would do it like this...
CurrentDb.Execute "INSERT INTO
Customers(CustomerID,BusinessName,FName,LName) " & _
"VALUES(" & Forms!AddCustomer!TxtCustomerID & "," &
Forms!AddCustomer!TxtBusinessName & ", " & _
"" & Forms!AddCustomer!TxtFName & "," & Forms!AddCustomer!TxtLName & ")"
But now I am being forced to add ' around the fields...
Anyone know why?
Thanks
DS
CurrentDb.Execute "INSERT INTO
Customers(CustomerID,BusinessName,FName,LName) " & _
"VALUES(" & Forms!AddCustomer!TxtCustomerID & ",'" &
Forms!AddCustomer!TxtBusinessName & "', " & _
"'" & Forms!AddCustomer!TxtFName & "','" & Forms!AddCustomer!TxtLName & "')"
the fields are Text Fields, the values are coming from an unbound textbox.
Normally I would do it like this...
CurrentDb.Execute "INSERT INTO
Customers(CustomerID,BusinessName,FName,LName) " & _
"VALUES(" & Forms!AddCustomer!TxtCustomerID & "," &
Forms!AddCustomer!TxtBusinessName & ", " & _
"" & Forms!AddCustomer!TxtFName & "," & Forms!AddCustomer!TxtLName & ")"
But now I am being forced to add ' around the fields...
Anyone know why?
Thanks
DS
CurrentDb.Execute "INSERT INTO
Customers(CustomerID,BusinessName,FName,LName) " & _
"VALUES(" & Forms!AddCustomer!TxtCustomerID & ",'" &
Forms!AddCustomer!TxtBusinessName & "', " & _
"'" & Forms!AddCustomer!TxtFName & "','" & Forms!AddCustomer!TxtLName & "')"