PC Review


Reply
Thread Tools Rate Thread

DLookup (again) A97

 
 
Kahuna
Guest
Posts: n/a
 
      20th Feb 2007
Last one for today guys ... promise!! lol

What's wrong with this structure:

bolFound = DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = "
& strCurrentUserName)

qry_tblLoggedIn is a RWOP query based on a locked table. It does show the
correct rows (and has the field li_user_name)

The error is '... Automation Object Does Not Contain 'irjs' (which is the
contents of the current user var).

Any suggestions gratefully received!
--
Kahuna
------------


 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      20th Feb 2007
You need to delimit the string value with quotation marks or apostrophes.

DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = " & Chr(34) &
strCurrentUserName & Chr(34))

OR
DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = """ &
strCurrentUserName & """")

OR
DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = '"
strCurrentUserName & "'")

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"Kahuna" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Last one for today guys ... promise!! lol
>
> What's wrong with this structure:
>
> bolFound = DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] =
> " & strCurrentUserName)
>
> qry_tblLoggedIn is a RWOP query based on a locked table. It does show the
> correct rows (and has the field li_user_name)
>
> The error is '... Automation Object Does Not Contain 'irjs' (which is the
> contents of the current user var).
>
> Any suggestions gratefully received!
> --
> Kahuna
> ------------
>
>



 
Reply With Quote
 
Kahuna
Guest
Posts: n/a
 
      20th Feb 2007
Thanks John - knew my syntax was out (that's a seriously complicated
structure)!

Always great support here.

Cheers

--
Kahuna
------------
"John Spencer" <(E-Mail Removed)> wrote in message
news:OZ$(E-Mail Removed)...
> You need to delimit the string value with quotation marks or apostrophes.
>
> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = " & Chr(34)
> & strCurrentUserName & Chr(34))
>
> OR
> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = """ &
> strCurrentUserName & """")
>
> OR
> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = '"
> strCurrentUserName & "'")
>
> --
> John Spencer
> Access MVP 2002-2005, 2007
> Center for Health Program Development and Management
> University of Maryland Baltimore County
> .
>
> "Kahuna" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Last one for today guys ... promise!! lol
>>
>> What's wrong with this structure:
>>
>> bolFound = DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] =
>> " & strCurrentUserName)
>>
>> qry_tblLoggedIn is a RWOP query based on a locked table. It does show the
>> correct rows (and has the field li_user_name)
>>
>> The error is '... Automation Object Does Not Contain 'irjs' (which is the
>> contents of the current user var).
>>
>> Any suggestions gratefully received!
>> --
>> Kahuna
>> ------------
>>
>>

>
>



 
Reply With Quote
 
John Spencer
Guest
Posts: n/a
 
      21st Feb 2007
I hope you understood that I meant to use ONE of the three variations and
not all three.

They were three alternatives to having the text properly delimited.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"Kahuna" <(E-Mail Removed)> wrote in message
news:%23$(E-Mail Removed)...
> Thanks John - knew my syntax was out (that's a seriously complicated
> structure)!
>
> Always great support here.
>
> Cheers
>
> --
> Kahuna
> ------------
> "John Spencer" <(E-Mail Removed)> wrote in message
> news:OZ$(E-Mail Removed)...
>> You need to delimit the string value with quotation marks or apostrophes.
>>
>> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = " &
>> Chr(34) & strCurrentUserName & Chr(34))
>>
>> OR
>> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = """ &
>> strCurrentUserName & """")
>>
>> OR
>> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = '"
>> strCurrentUserName & "'")
>>
>> --
>> John Spencer
>> Access MVP 2002-2005, 2007
>> Center for Health Program Development and Management
>> University of Maryland Baltimore County
>> .
>>
>> "Kahuna" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Last one for today guys ... promise!! lol
>>>
>>> What's wrong with this structure:
>>>
>>> bolFound = DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name]
>>> = " & strCurrentUserName)
>>>
>>> qry_tblLoggedIn is a RWOP query based on a locked table. It does show
>>> the correct rows (and has the field li_user_name)
>>>
>>> The error is '... Automation Object Does Not Contain 'irjs' (which is
>>> the contents of the current user var).
>>>
>>> Any suggestions gratefully received!
>>> --
>>> Kahuna
>>> ------------
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Kahuna
Guest
Posts: n/a
 
      21st Feb 2007
Ha yes John lmao, I did realise.

Thanks for the input again. I have saved all three of your options for
future use.

Muchas Gracias

--
Kahuna
------------
"John Spencer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I hope you understood that I meant to use ONE of the three variations and
>not all three.
>
> They were three alternatives to having the text properly delimited.
>
> --
> John Spencer
> Access MVP 2002-2005, 2007
> Center for Health Program Development and Management
> University of Maryland Baltimore County
> .
>
> "Kahuna" <(E-Mail Removed)> wrote in message
> news:%23$(E-Mail Removed)...
>> Thanks John - knew my syntax was out (that's a seriously complicated
>> structure)!
>>
>> Always great support here.
>>
>> Cheers
>>
>> --
>> Kahuna
>> ------------
>> "John Spencer" <(E-Mail Removed)> wrote in message
>> news:OZ$(E-Mail Removed)...
>>> You need to delimit the string value with quotation marks or
>>> apostrophes.
>>>
>>> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = " &
>>> Chr(34) & strCurrentUserName & Chr(34))
>>>
>>> OR
>>> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = """ &
>>> strCurrentUserName & """")
>>>
>>> OR
>>> DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name] = '"
>>> strCurrentUserName & "'")
>>>
>>> --
>>> John Spencer
>>> Access MVP 2002-2005, 2007
>>> Center for Health Program Development and Management
>>> University of Maryland Baltimore County
>>> .
>>>
>>> "Kahuna" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Last one for today guys ... promise!! lol
>>>>
>>>> What's wrong with this structure:
>>>>
>>>> bolFound = DLookup("[li_date_time]", "qry_tblLoggedIn", "[li_user_name]
>>>> = " & strCurrentUserName)
>>>>
>>>> qry_tblLoggedIn is a RWOP query based on a locked table. It does show
>>>> the correct rows (and has the field li_user_name)
>>>>
>>>> The error is '... Automation Object Does Not Contain 'irjs' (which is
>>>> the contents of the current user var).
>>>>
>>>> Any suggestions gratefully received!
>>>> --
>>>> Kahuna
>>>> ------------
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dlookup using a date defiined by another dlookup =?Utf-8?B?QmVubnlESGlsbA==?= Microsoft Access VBA Modules 1 8th Aug 2007 02:56 AM
Help with DLookup lucky33 Microsoft Access Form Coding 3 16th Jul 2007 02:10 AM
Re: Dlookup function - copying the dlookup info into a field.... Douglas J. Steele Microsoft Access Forms 0 6th Dec 2006 03:05 PM
Using DLookUp =?Utf-8?B?QXJhY2E=?= Microsoft Access Queries 5 10th Jan 2005 09:01 PM
Dlookup problems (was my Dlookup hell) Kavvy Microsoft Access Form Coding 3 18th Nov 2003 01:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 AM.