Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Checking DB to see if match....

Discussion in 'Information Technology' started by dcash45, Jul 28, 2006.

Tags:
  1. dcash45

    dcash45
    Expand Collapse
    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
     
  2. Loading...

    Similar Threads Forum Date
    General 9/11 film worth checkingout Hard Talk Oct 6, 2006
    GurmatChanan Updates Gurbani Download Aug 27, 2011
    India Manmohan invites Zardari, Gilani for India-Pakistan match Breaking News Mar 26, 2011
    Harbhajan hits his maiden test century,saves match for India Sports & Fitness Nov 9, 2010
    Arranged marriage? Or Love-match? Insights, Prospects for the future Love & Marriage Oct 11, 2010

  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    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



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


    "dcash45" <dcash45@discussions.microsoft.com> wrote in message
    news:EDC2F128-26C8-4B22-83B8-97B9B7B3B3C2@microsoft.com...
    > 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
    >
     
  4. dcash45

    dcash45
    Expand Collapse
    Guest

    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...

    "Douglas J. Steele" wrote:

    > 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
    >
    >
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "dcash45" <dcash45@discussions.microsoft.com> wrote in message
    > news:EDC2F128-26C8-4B22-83B8-97B9B7B3B3C2@microsoft.com...
    > > 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
    > >

    >
    >
    >
     

Share This Page