Results 1 to 3 of 3
  1. #1
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126

    Open Form Error message

    I am having an issue with names that contain an apostrophe. The code functions fine with (Jeff Flake) but not for (Tom O'Halleran).

    Code:
    DoCmd.OpenForm "PoliticianDataF", , , "[President]=" & "'" & [Politician] & "'"
    Thanxs

    Jim O

    apostrophe



  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    try
    Code:
    DoCmd.OpenForm "PoliticianDataF", , , "[President]= """ & [Politician] & """"

  3. #3
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126
    Thank you, that does the trick.

    Jim O

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 09-18-2017, 11:09 AM
  2. Replies: 232
    Last Post: 04-17-2017, 01:08 PM
  3. Replies: 13
    Last Post: 04-21-2016, 03:33 AM
  4. Replies: 7
    Last Post: 12-20-2012, 10:20 PM
  5. Replies: 1
    Last Post: 08-01-2011, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums