A
Amy
I have a form I'm building where the user enters a booth number to be added
to the booth inventory. The booth number must begin with a letter, so I am
testing to make sure that it does by using the line
If Left(Me.Booth_Number, 1) < "A" Or Left(Me.Booth_Number, 1) > "Z" Then
However, what I really want to do is limit the possibilities to a set of
letters that change from show to show depending on the facility we are in.
For instance, in 2010, the values are N, C, S, and P for North, Central,
South, and Parking; but in 2011, we move to a different city, so the values
would change to W, S, and P for West, South, and Parking.
Basically, what I want it to do is run a query that pulls the first
character of each hall from my floor plans table and compares the first
character from the booth number against that subset. If they don't match,
then a dialog box opens to tell the user that he needs to include the initial
of the hall in the booth number.
Is there any way to do that using VBA code, or am I way off here?
to the booth inventory. The booth number must begin with a letter, so I am
testing to make sure that it does by using the line
If Left(Me.Booth_Number, 1) < "A" Or Left(Me.Booth_Number, 1) > "Z" Then
However, what I really want to do is limit the possibilities to a set of
letters that change from show to show depending on the facility we are in.
For instance, in 2010, the values are N, C, S, and P for North, Central,
South, and Parking; but in 2011, we move to a different city, so the values
would change to W, S, and P for West, South, and Parking.
Basically, what I want it to do is run a query that pulls the first
character of each hall from my floor plans table and compares the first
character from the booth number against that subset. If they don't match,
then a dialog box opens to tell the user that he needs to include the initial
of the hall in the booth number.
Is there any way to do that using VBA code, or am I way off here?