Re: Getting other field's value in the table
- From: "ruralguy via AccessMonster.com" <u12102@uwe>
- Date: Wed, 25 Oct 2006 23:57:24 GMT
How about doing something like:
Dim x As Variant
x = DLookup("[UserID]", "tblUser", "[UserName]= '" & strUserName & "'")
If you have a match then x = UserID
Chris L wrote:
Hi,
The source code is roughly like this.
x = DLookup("[UserName]", "tblUser", "[UserName]= '" & strUserName & "'")
If IsNull(x) Then
'Add new UserName
Else
'I want to get the UserID of the existing UserName
End If
Regards,
Chris
What is the DLookUp() code you are using? Are you asking for the UserID?[quoted text clipped - 11 lines]
Regards,
Chris
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.
Message posted via http://www.accessmonster.com
.
- References:
- Re: Getting other field's value in the table
- From: ruralguy via AccessMonster.com
- Re: Getting other field's value in the table
- Prev by Date: Re: Call a table base on criteria
- Next by Date: Re: option values
- Previous by thread: Re: Getting other field's value in the table
- Next by thread: Access vs Ms Outlook
- Index(es):
Relevant Pages
|