RE: DBLookup problem in a query
- From: "'69 Camaro" <ForwardZERO_SPAM.To.69Camaro@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Apr 2005 07:42:02 -0700
Hi.
If FiscalMonth is not a numerical data type, then the value assigned to it
must be delineated as a string. This can be single quotes or a pair of
double quotes. For example (all one line):
Month: DLookUp("[Month]","Months","[FiscalMonth]= '" &
Forms!frmPNInputTime![Fiscal Month]) & "'"
Ensure that the frmPNInputTime form is open when this query is run and that
it has a value. Also, Month is a reserved word, so I would suggest using a
different name for the field and alias, so as to prevent unexpected results
in expressions (i.e., bugs).
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are Ripley@xxxxxxxxxxxxxxx and scott@xxxxxxxxxxxxxxxxxx
- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that the first and
best answers are often given to those who have a history of rewarding the
contributors who have taken the time to answer questions correctly.
"MacNut" wrote:
> Hello,
>
> I have a problem with a dblookup in my query. Here is the code I have:
>
> Month: DLookUp("[Month]","Months","[FiscalMonth]=" &
> Forms!frmPNInputTime![Fiscal Month])
>
> Now, it works for the initial part of the code when not using the criteria
> portion of the code. What is going wrong?
>
> Thank you,
> MN
.
- References:
- DBLookup problem in a query
- From: MacNut
- DBLookup problem in a query
- Prev by Date: RE: DBLookup problem in a query
- Next by Date: RE: if statements and variables
- Previous by thread: Re: DBLookup problem in a query
- Next by thread: Delete/Update prompts
- Index(es):
Relevant Pages
|