Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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

    >
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page