Hello All
I am trying to select a record to edit using the following commands
query = "select * from companies where name=" & Forms![Main Details]![CO_NAME]
Set record = dbbooking.OpenR ecordset(query)
Forms![Main Details]![CO_NAME] is pointing to 'dummy co'
but i get this error when attempting to select the record
Syntax error (missing operator) in query expression 'name=dummy co'
I have tried putting companies and name in square brackets but it doesn't affect it!
Any clues out there?
Many thanks in advance
I am trying to select a record to edit using the following commands
query = "select * from companies where name=" & Forms![Main Details]![CO_NAME]
Set record = dbbooking.OpenR ecordset(query)
Forms![Main Details]![CO_NAME] is pointing to 'dummy co'
but i get this error when attempting to select the record
Syntax error (missing operator) in query expression 'name=dummy co'
I have tried putting companies and name in square brackets but it doesn't affect it!
Any clues out there?
Many thanks in advance
Comment