Thanks for the help. Unfortunately that did not do anything. The
program had already put the = in front.
Hopefully you can give me another idea to try. Thanks
John
On May 30, 3:18 pm, Andy Hull <AndyH...@discussions.microsoft.com>
wrote:
Hi again John
If you are setting your display with VBA code use the expressions as I've
stated...
dlookup("Title", "tblBooks", "BookBarCode = " & Me.BookBarCode)
If you are setting the control source then drop the Me. so the expression
is...
dlookup("Title", "tblBooks", "BookBarCode = " & BookBarCode)
Note, i've assumed BookBarCode is numeric. If it is text you will need to
put single quotes around it so the 2 versions of the expression become...
dlookup("Title", "tblBooks", "BookBarCode = '" & BookBarCode & "'")
or
dlookup("Title", "tblBooks", "BookBarCode = '" & Me.BookBarCode & "'")
Sorry for the confusion - hope this helps
Andy Hull
> Thanks for the help. Unfortunately that did not do anything. The
> program had already put the = in front.
[quoted text clipped - 45 lines]
> > > > > possible?
> > > > > Thanks for any guidance.
jlydon - 03 Jun 2007 04:22 GMT
Dear Andy: Thanks again. I just got back from a trip so only now could
try again. I would like to clarify the following:
BookBarCode= is enclosed in double quotes
This is followed by a single quote since it is a text field and not a
number field
Then comes &BookBarCode&. How is this followed by a single quote, or
is the single quote then followed by a double quote as seems to be the
case from the text?
I am typing in the text where it says Control Source on the properties
menu, so I don't know if thea is VBA code or not.
Thanks for clarifying.
John
On May 31, 4:10 am, Andy Hull <AndyH...@discussions.microsoft.com>
wrote:
> Hi again John
>
[quoted text clipped - 68 lines]
> > > > > > possible?
> > > > > > Thanks for any guidance.
Andy Hull - 04 Jun 2007 09:41 GMT
Hi again John
Here is the statement with asterisks where there should be single quotes so
it is easier to see...
dlookup("Title", "tblBooks", "BookBarCode = *" & BookBarCode & "*")
Note this is assuming the is a table called tblBooks with a field called
BookBarCode and that your form has a control called BookBarCode.
Regards
Andy Hull
> Dear Andy: Thanks again. I just got back from a trip so only now could
> try again. I would like to clarify the following:
[quoted text clipped - 84 lines]
> > > > > > > possible?
> > > > > > > Thanks for any guidance.
jlydon - 05 Jun 2007 04:19 GMT
Dear Andy: Many thanks. That worked great. John
On Jun 4, 3:41 am, Andy Hull <AndyH...@discussions.microsoft.com>
wrote:
> Hi again John
>
[quoted text clipped - 98 lines]
> > > > > > > > possible?
> > > > > > > > Thanks for any guidance.