Checking DB to see if match....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey Im trying to match something a user has enter to something that’s already
in the database. Here’s what Im trying to do…I want a new user to make up a
username but I want to make sure that the username they made up is not
already taken by a different user already in the database.

Can anyone help with how I can search the database in match the 2 so that
the new user cant pick the same username…


Thank you
 
DLookup is probably the simplest approach.

If IsNull(DLookup("UserName", "UserTable", "UserName = '" & PossibleName
& "'")) Then

' PossibleName doesn't already exist in UserTable

Else

' PossibleName already exists in UserTable

End If
 
Thank you Douglas, that helped a lot....well I going to continue to test it
out to see if it works fully the way I would like it to...
 
Back
Top