Attempting to use the following code to populate some SQL with the contents of a Textbox. Any tips as to what is wrong wrong would be apprecaited.
Set rst = dbs.OpenRecordset("Select * FROM Contact " _
& "WHERE Contact.Name = " & Me!txtName)
I've tried using parts of the Where clause from the Query design facility, but cannot get that to work either.
SELECT Contact.ID, Contact.Name, Contact.Phone, Contact.Notes
FROM Contact
WHERE (((Contact.Name)=[Forms]![frmTest]![txtName]));
Set rst = dbs.OpenRecordset("Select * FROM Contact " _
& "WHERE Contact.Name = " & Me!txtName)
I've tried using parts of the Where clause from the Query design facility, but cannot get that to work either.
SELECT Contact.ID, Contact.Name, Contact.Phone, Contact.Notes
FROM Contact
WHERE (((Contact.Name)=[Forms]![frmTest]![txtName]));