End of Code Line Comments Out

D

David Habercom

Why does the end of this line of code become a comment
just after [DonName] = " & "? The next single quote is
read as the beginning of a comment, and I can't force it
otherwise. Thanks.

DoCmd.OpenReport strSelEndowmtRpt, ViewPreview, , "[EnFNo]
= " & "'" & strSelEnFNo & "'" And [DonName] = " & "'" &
strSelDonor & "'" & ""
 
M

Marshall Barton

David said:
Why does the end of this line of code become a comment
just after [DonName] = " & "? The next single quote is
read as the beginning of a comment, and I can't force it
otherwise. Thanks.

DoCmd.OpenReport strSelEndowmtRpt, ViewPreview, , "[EnFNo]
= " & "'" & strSelEnFNo & "'" And [DonName] = " & "'" &
strSelDonor & "'" & ""
Upu jave an extra double quote before the And, so everything
is out of balance after that.
 
Top