Avatar of pdvsa
pdvsa
Flag for United States of America asked on

Open form, text data type

Experts,

I am trying to open a form to the criteria below.
The [LCNo] is text data type.
I believe I need some combination of single quotes and double quotes as it is text data type and not a number but the order and placement of the quotes is what I need help with.  

thank you

Private Sub LCNo_Click()

        DoCmd.OpenForm "frmLetterOfCreditAdd", , , "[LCNo]=" & Me!LCNo

End Sub
Microsoft Access

Avatar of undefined
Last Comment
mbizup

8/22/2022 - Mon
mbizup

Your criteria should look like this :

"LCNo = '" &
ASKER CERTIFIED SOLUTION
mbizup

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Rey Obrero (Capricorn1)

DoCmd.OpenForm "frmLetterOfCreditAdd", , , "[LCNo]='" & Me!LCNo & "'"

exploded view


DoCmd.OpenForm "frmLetterOfCreditAdd", , , "[LCNo]= ' " & Me.LCNo & " ' "

or you can use this

DoCmd.OpenForm "frmLetterOfCreditAdd", , , "[LCNo]=" & chr(34) & Me.LCNo & chr(34)
pdvsa

ASKER
glad you came back quick because I scratching my head on that.   thank you. it worked perfectly!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
mbizup

:-)

I'll blame my cellphone for that first post.