D
David Hewitt
I have a Visual Basic program which uses an Access database.
I use the normal Add, Change, Delete, OK, and Cancel functions for
adding to, altering or deleting and these work fine.
I then use a Find function to select one particular record.
If the Name field contains an apostrophe I get an error.
The coding that I am using is as follows:-
Private Sub cmdSelectRecipe_Click()
'Select Recipe
Data1.Recordset.FindFirst "RecipeName like" & "'" & DataList1 & "*"
& "'"
cmdSelectRecipe_OK:
End Sub
any suggestions, please, as to how I can make it accept an apostrophe
without giving rise to an error message.
David
I use the normal Add, Change, Delete, OK, and Cancel functions for
adding to, altering or deleting and these work fine.
I then use a Find function to select one particular record.
If the Name field contains an apostrophe I get an error.
The coding that I am using is as follows:-
Private Sub cmdSelectRecipe_Click()
'Select Recipe
Data1.Recordset.FindFirst "RecipeName like" & "'" & DataList1 & "*"
& "'"
cmdSelectRecipe_OK:
End Sub
any suggestions, please, as to how I can make it accept an apostrophe
without giving rise to an error message.
David