LonnieJohnson
Programmer
I have been programming in Access/VB for a while, but have just recently starting using a lot of SQL in my code. I have a situation where some fields in my records have an apostrophe, ie: Women's Communty Center
My SQL reads:
MyField.RowSource = "SELECT DISTINCT FIELD FROM TABLE " _
& "WHERE (ANOTHERFIELD) = '" & VARIABLE & "';"
THIS WORKS FINE FOR ANY RECORD THAT DOES NOT HAVE AN APOSTROPHE IN THE FIELD NAME.
THANKS. lcjohnson@kawvalley.org
My SQL reads:
MyField.RowSource = "SELECT DISTINCT FIELD FROM TABLE " _
& "WHERE (ANOTHERFIELD) = '" & VARIABLE & "';"
THIS WORKS FINE FOR ANY RECORD THAT DOES NOT HAVE AN APOSTROPHE IN THE FIELD NAME.
THANKS. lcjohnson@kawvalley.org