dlookup problem

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

laveshhp via AccessMonster.com

Hi!
i have problem inreport when i use dlookup

As Example:

Table1

Id TranDate FieldA
FieldB
(AutoNumber) Date/Time Currancy Currancy

Now I Create Query as Below

Id TranDate FieldA FieldB Balance
1 9/1/06 100.00 100.00 200.00

Now in criteria row in query i put as below
Is Not Null And Between [Forms]![Date3]![BeginningDate] And [Forms]![Date3]!
[EndingDate]

i create form name Date3 with two unbound field

i create report as below :

**** Bal :=DLookUp("[BAL]","[Table1 Query]","[trandate] =#" & Format(
[Forms]![Date3]![BeginningDate],"\#mm/dd/yyyy\#"))


Id TranDate Field A FieldB Balance


i get error in bal field where i marke **** but if i don't put any
statment in criteria row i get value but i need date range is any body have
idea to get value with date range

thanks
 
B

Barry Gilbert

There's no reason to format the date value in your criteria statement. Try
this:

Bal :=DLookUp("[BAL]","[Table1 Query]","[trandate] =#" &
[Forms]![Date3]![BeginningDate] & "#")

I'm not clear on where you're using this, but you might not need the equal
sign at the beginning.

Barry
 
L

laveshhp via AccessMonster.com

Barry said:
There's no reason to format the date value in your criteria statement. Try
this:

=DLookUp("[BAL]","[Table1 Query]","[trandate] =#" &
[Forms]![Date3]![BeginningDate] & "#")

I'm not clear on where you're using this, but you might not need the equal
sign at the beginning.

Barry
Hi!
i have problem inreport when i use dlookup
[quoted text clipped - 30 lines]
Now i get #name?

thanks for your quick reply
 
B

Barry Gilbert

Hmm. How about qualifying the criteria's field like this:

=DLookUp("[BAL]","[Table1 Query]","[Table1 Query].[trandate] =#" &
[Forms]![Date3]![BeginningDate] & "#")

Barry


laveshhp via AccessMonster.com said:
Barry said:
There's no reason to format the date value in your criteria statement. Try
this:

=DLookUp("[BAL]","[Table1 Query]","[trandate] =#" &
[Forms]![Date3]![BeginningDate] & "#")

I'm not clear on where you're using this, but you might not need the equal
sign at the beginning.

Barry
Hi!
i have problem inreport when i use dlookup
[quoted text clipped - 30 lines]
Now i get #name?

thanks for your quick reply
 
L

laveshhp via AccessMonster.com

Barry said:
Hmm. How about qualifying the criteria's field like this:

=DLookUp("[BAL]","[Table1 Query]","[Table1 Query].[trandate] =#" &
[Forms]![Date3]![BeginningDate] & "#")

Barry
[quoted text clipped - 15 lines]
thanks for your quick reply
Thanks For reply but still get #name?
 
L

laveshhp via AccessMonster.com

laveshhp said:
Hmm. How about qualifying the criteria's field like this:
[quoted text clipped - 8 lines]Thanks For reply but still get #name?


It works with this statment

=DLookUp("[BAL]","[Table1 Query]","[Table1 Query].trandate =#" &
[Forms]![Date3]![BeginningDate] & "#")

Thank you very much
 

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

Similar Threads

dlookup 5
dlookup 3
PREVIOUS RECORD VALUE 3
PREVIOUS RECORD VALUE IN FIELD 6
dlookup 4
DCOUNT unique records 2
please help me 3
DLookup - why this syntax? 12

Top