Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apostrophe's in Listbox 1

Status
Not open for further replies.

traycee

IS-IT--Management
Sep 6, 2001
245
US
Hi! :)
I have a dialog form that contains a couple of list boxes. All was working well till I clicked on an item in the listbox that contains an apostrophe. Example: Appeal works Appeal's won't work. I get an error message and the report fails to generate. The listbox is an unbound control and is populated by selecting a distinctrow from a query. I'm guessing the names list boxes will fail similarly on names with an apostrophe. Is there a way to allow the users to input the names with apostrophes but get rid of the apostrophe when the listbox populates or run the listbox with the apostrophe. Hope this makes sense.
Thanks
 
I am not quite sure what you wish to do, but it is quite common to use:
Replace (FieldName,"'","''")
When running queries with fields that contain apostrophes.
 
Makes since. I dont know how to do it, but i did want to ask: What does the Appeal own?

-Pete
 
Heh, ok. I was asking because i didnt think it was necessary to have the apostrophe. If traycee is making the same error as he/she did in the thread title then he/she is placing an apostrophe in a word that ends with "s" even though it doesnt have possession of something.

-Pete
 
It's actually an appeal name. For instance
Metalkraft's 6K Run it can also happen on a name like O'Ryan.
 
Thanks Remou,
That's exactly what I was looking for. It works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top