Group:  Microsoft Access ยป microsoft.public.access.forms
Thread: dlookup

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

dlookup
"laveshhp via AccessMonster.com" <u26306[ at ]uwe> 13.09.2006 20:45:43
Hi!

Please help me

i need data from my query for beginning date which i use in date form range
and i use below but show me #error

=DLookUp("[Balance]","Table1 Query",[Forms]![Date3]!Format([BeginningDate],
"#"))

thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200609/1

Re: dlookup
"Eric Heinold" <eric[ at ]SPAMadaptaFILTERsoft.com> 13.09.2006 21:09:41
Not sure what you are are doing with the 3rd part of the statement, but it
looks like you have some things wrong there:
[Forms]![Date3]!Format([BeginningDate],"#")

This is usually in the form of :
[Query Field Name] = Expression

Example:

"StartDate = " & Forms!Date3!BeginningDate

StartDate would be the name of the field in the query, change this if it
is different.
Often to make Dlookup recognize a date, I put # at the start and end of
the date:

"BeginningDate = #" & Forms!Date3!BeginningDate & "#"

"laveshhp via AccessMonster.com" <u26306[ at ]uwe> wrote in message
news:663efc7ba2aca[ at ]uwe...
[Quoted Text]
> Hi!
>
> Please help me
>
> i need data from my query for beginning date which i use in date form
> range
> and i use below but show me #error
>
> =DLookUp("[Balance]","Table1
> Query",[Forms]![Date3]!Format([BeginningDate],
> "#"))
>
> thanks
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200609/1
>


Re: dlookup
"laveshhp via AccessMonster.com" <u26306[ at ]uwe> 13.09.2006 21:36:20
Eric Heinold wrote:
[Quoted Text]
>Not sure what you are are doing with the 3rd part of the statement, but it
>looks like you have some things wrong there:
> [Forms]![Date3]!Format([BeginningDate],"#")
>
> This is usually in the form of :
> [Query Field Name] = Expression
>
> Example:
>
> "StartDate = " & Forms!Date3!BeginningDate
>
> StartDate would be the name of the field in the query, change this if it
>is different.
> Often to make Dlookup recognize a date, I put # at the start and end of
>the date:
>
> "BeginningDate = #" & Forms!Date3!BeginningDate & "#"
>
>> Hi!
>>
>[quoted text clipped - 9 lines]
>>
>> thanks

Hi! Eric
Thanks for quick reply but i am new in access so can you provide me all
formula

date is my query field and i need data only for my beginning date which i put
in date3 form

thanks for your help

--
Message posted via http://www.accessmonster.com

Re: dlookup
"Eric Heinold" <eric[ at ]SPAMadaptaFILTERsoft.com> 14.09.2006 12:29:48
=DLookUp("[Balance]","Table1 Query","Date=[Forms]![Date3]![BeginningDate]")

After looking at the query again and your question again, I think this is
how you will need structure it. I usually use Dlookup in code, so I would
to it the way I noted below, but for a control source, I think this will
work for you.
"laveshhp via AccessMonster.com" <u26306[ at ]uwe> wrote in message
news:663f6dbb94d68[ at ]uwe...
[Quoted Text]
> Eric Heinold wrote:
>>Not sure what you are are doing with the 3rd part of the statement, but it
>>looks like you have some things wrong there:
>> [Forms]![Date3]!Format([BeginningDate],"#")
>>
>> This is usually in the form of :
>> [Query Field Name] = Expression
>>
>> Example:
>>
>> "StartDate = " & Forms!Date3!BeginningDate
>>
>> StartDate would be the name of the field in the query, change this if
>> it
>>is different.
>> Often to make Dlookup recognize a date, I put # at the start and end
>> of
>>the date:
>>
>> "BeginningDate = #" & Forms!Date3!BeginningDate & "#"
>>
>>> Hi!
>>>
>>[quoted text clipped - 9 lines]
>>>
>>> thanks
>
> Hi! Eric
> Thanks for quick reply but i am new in access so can you provide me all
> formula
>
> date is my query field and i need data only for my beginning date which i
> put
> in date3 form
>
> thanks for your help
>
> --
> Message posted via http://www.accessmonster.com
>


Re: dlookup
"laveshhp via AccessMonster.com" <u26306[ at ]uwe> 15.09.2006 13:43:21
Eric Heinold wrote:
[Quoted Text]
>=DLookUp("[Balance]","Table1 Query","Date=[Forms]![Date3]![BeginningDate]")
>
>After looking at the query again and your question again, I think this is
>how you will need structure it. I usually use Dlookup in code, so I would
>to it the way I noted below, but for a control source, I think this will
>work for you.
>>>Not sure what you are are doing with the 3rd part of the statement, but it
>>>looks like you have some things wrong there:
>[quoted text clipped - 31 lines]
>>
>> thanks for your help
Hi!

Still didn't work now i ger #error message

thanks for your help

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200609/1

Re: dlookup
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 15.09.2006 14:04:31
Since there's a space in Table1 Query, it needs to be enclosed in square
brackets. You should also take the reference to the form field out of the
quotes, make sure it's delimited with #, and that it's in mm/dd/yyyy format
(regardless of what your Regional Settings might be). Finally, Date is a
reserved word, and shouldn't be used for your own purposes. If you cannot
(or will not) change the name, at least use square brackets around it:

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


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"laveshhp via AccessMonster.com" <u26306[ at ]uwe> wrote in message
news:665471e3e946a[ at ]uwe...
[Quoted Text]
> Eric Heinold wrote:
>>=DLookUp("[Balance]","Table1
>>Query","Date=[Forms]![Date3]![BeginningDate]")
>>
>>After looking at the query again and your question again, I think this is
>>how you will need structure it. I usually use Dlookup in code, so I would
>>to it the way I noted below, but for a control source, I think this will
>>work for you.
>>>>Not sure what you are are doing with the 3rd part of the statement, but
>>>>it
>>>>looks like you have some things wrong there:
>>[quoted text clipped - 31 lines]
>>>
>>> thanks for your help
> Hi!
>
> Still didn't work now i ger #error message
>
> thanks for your help
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200609/1
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net