dlookup

  • Thread starter Thread starter laveshhp via AccessMonster.com
  • Start date Start date
L

laveshhp via AccessMonster.com

any idea why i get #name

=DLookUp("[OpenBal]","Table11","[Date] =" & Format([Forms]![Date3]!
[BeginningDate],"\#mm/dd/yyyy\#"))

thanks
 
If you have a field in the Table11 table named Date, it is an Access reserved
word and can easily get Access confused. I would strongly recommend renaming
that field to something else. I would also try your Format() function in the
immediate window to see if it works.
any idea why i get #name

=DLookUp("[OpenBal]","Table11","[Date] =" & Format([Forms]![Date3]!
[BeginningDate],"\#mm/dd/yyyy\#"))

thanks
 
ruralguy said:
If you have a field in the Table11 table named Date, it is an Access reserved
word and can easily get Access confused. I would strongly recommend renaming
that field to something else. I would also try your Format() function in the
immediate window to see if it works.
any idea why i get #name

=DLookUp("[OpenBal]","Table11","[Date] =" & Format([Forms]![Date3]!
[BeginningDate],"\#mm/dd/yyyy\#"))

thanks
thanks for your reply
i have date field in query and i use this statment for report which is bring
data from query please advise me i should rename date field or not

thanks
 
Regardless of other concerns, using an Access reserved word as the name of a
field *will* give you grief at some point. It's best to rename it as early
in the development cycle as possible. Did you try your Format() statement in
the Immediate window to see if you get the results you expect or maybe single
step the code and look at the results.
If you have a field in the Table11 table named Date, it is an Access reserved
word and can easily get Access confused. I would strongly recommend renaming
[quoted text clipped - 7 lines]
thanks for your reply
i have date field in query and i use this statment for report which is bring
data from query please advise me i should rename date field or not

thanks
 
Back
Top