Help with apostrophe

N

Nathan Wolfe

Is it possible to use chr$(34) in this code so that Me!cboLocation can accept
text strings that include apostrophes? Thanks.

If (DLookup("[RegularStopID]", "[tblStops]", "[Location] = '" &
Me!cboLocation & "' And [Datestop] = #" & Me!cboDate & "# And [Timestop] = #"
& Me!cboTimestop & "#")) Then
 
S

SteveM

Yes it should be fine.

If (DLookup("[RegularStopID]", "[tblStops]", "[Location] = " & Chr$(34) &
Me!cboLocation & Chr$(34) & " And [Datestop] = #" & Me!cboDate & "# And
[Timestop] = #" & Me!cboTimestop & "#")) Then

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top