S
Stockwell43
Hello,
I a database that is kind of like an Auction type deal. If a user enters
their user ID and click the button, it will automatically display their
chosen private ID (or Auction ID). What I want to know is, I have 80 people
in my department and the code (only way I know how to do it) will become very
long. Can I set up a table with the User ID and Private ID and when the
button is clicked, have it read from the table and display the Private ID
that way? Below is how I am going to do it if no alternative.
Private Sub cmdStatusUpdate_Click()
Me.NewBid.Locked = False
If Me.UserID = "123" Then
Me.PrivateID = "Dman42"
ElseIf Me.UserID = "321" Then
Me.PrivateID = "apples01"
ElseIf Me.UserID = "777" Then
Me.PrivateID = "nessa1"
ElseIf Me.UserID = "888" Then
Me.PrivateID = "sweet1"
ElseIf Me.UserID = "trinity" Then
Me.PrivateID = "starbucks"
Else
MsgBox ("Incorrect UserID")
End If
End Sub
Thanks!!
I a database that is kind of like an Auction type deal. If a user enters
their user ID and click the button, it will automatically display their
chosen private ID (or Auction ID). What I want to know is, I have 80 people
in my department and the code (only way I know how to do it) will become very
long. Can I set up a table with the User ID and Private ID and when the
button is clicked, have it read from the table and display the Private ID
that way? Below is how I am going to do it if no alternative.
Private Sub cmdStatusUpdate_Click()
Me.NewBid.Locked = False
If Me.UserID = "123" Then
Me.PrivateID = "Dman42"
ElseIf Me.UserID = "321" Then
Me.PrivateID = "apples01"
ElseIf Me.UserID = "777" Then
Me.PrivateID = "nessa1"
ElseIf Me.UserID = "888" Then
Me.PrivateID = "sweet1"
ElseIf Me.UserID = "trinity" Then
Me.PrivateID = "starbucks"
Else
MsgBox ("Incorrect UserID")
End If
End Sub
Thanks!!