I have a problem with a query from Access. Here is what I have for the Afterload event:
Dim customer As DAO.Recordset, SQLTEXT
SQLTEXT = "select * From cust where " & "[cust] = '" & Me![client] & "';"
Set customer = CurrentDb.OpenRecordset(SQLTEXT)
Me![add1] = customer![add1]
Me![add2] = customer![add2]
Me![city] = customer![city]
Me![stat] = customer![stat]
Me![rate] = customer![rate]
Me.Refresh
If my cust field has no punctuation then the query works fine. If it does then the query fails. I also cannot get a new record to enter to the table. I get the dreaded #deleted ! I have timestamp field and have done all the fixes I can find. I have another combo box on this form in a subform and it works fine.
Thanks for looking
Dim customer As DAO.Recordset, SQLTEXT
SQLTEXT = "select * From cust where " & "[cust] = '" & Me![client] & "';"
Set customer = CurrentDb.OpenRecordset(SQLTEXT)
Me![add1] = customer![add1]
Me![add2] = customer![add2]
Me![city] = customer![city]
Me![stat] = customer![stat]
Me![rate] = customer![rate]
Me.Refresh
If my cust field has no punctuation then the query works fine. If it does then the query fails. I also cannot get a new record to enter to the table. I get the dreaded #deleted ! I have timestamp field and have done all the fixes I can find. I have another combo box on this form in a subform and it works fine.
Thanks for looking