Newby-Query Based on Selection-question For John N

P

PF

John, in helping me with the above, your last remark was "I've assumed that
ProdNumber is a numberic field . . . . .. . If ProdNumber is actually a text
field, you'll need to add quotes elsewhere".

The ProdNumber actually is text (combo of text & numbers). Where do I change
the quotes in the VB code you gave me?

Thanks,
Phyl
 
J

John Nurick

Make them the same as the ones I put round the Size field. You need to
allow for the fact that VBA uses quotes to demarcate a literal string in
code, and doubled quotes to indicate quotes within strings.

Your code needs to *produce* something like
Prodnumber = "1234XYZ"
which as a literal string in VBA code would be
"ProdNumber = ""1234XYZ"""
so assembling it to use the value from the form you have something like
"ProdNumber = """ & Me.cboProdNumber.Value & """"
 

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