their user id before the code runs?
btw, you can remove the brackets around the field and table names. in VBA,
you usually only need them if a name includes spaces, a special character,
or sometimes a number.
Hi Tina:
It looks in the table: pswc.
I have modified it but still... not working:
If (DLookup("[UserID]", "[pswc]", _
"[UserID]='" & [UserID] & "'")) Then
It said field:'|'not found?!
Thanks,
Dan
DoCmd.OpenForm stDocName, , , stLinkCriteria
-----Original Message-----
If DLookup("userid", "pswc", "UserID = ' & & "'") Then
& ... what? you have no value between the two
ampersands. where do you want
the system to get the value for the UserID? from a
control on a form? from
an InputBox?
give details of where/how you're using this line of code,
please.
message
Hi:
I wold like that is this is true and finds the userid in
the table then open a form...but is not working.
Can anyone help?
If DLookup("userid", "pswc", "UserID = ' & & "'")
Then..
Thanks,
Dan
.
.