How do I create drop down list for a column?

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

Guest

I created a database. One of the columns is for drivers license numbers which
I created an impust mask for. Today I received a Mexican drivers license
which has a different number and letter configuation than American licenses.
My imput mask will not allow me to enter in the license number because of the
addition of letters in the license number. I want to create a drop down list
for this field so it gives me the option to either imput an American or
foreign drivers license.
 
Karen,

Your most simple solution here would be just to drop the input mask.
However...

You said you want a dropdown for this field, but I think what you really
want is a dropdown on ANOTHER field that stores the country. Is this right?
If so, then you would simply add the field "Country" to your table, add it to
your form, right click on it and Change To combo box. You then assign the
rowsource of the combo box to fill in your dropdown. You can pull this from
a table or simply create the list in VB (this is probably the way you want to
go). You would then want to fire some code on the AfterUpdate event for the
combo box that would define the input mask for your license field. That's
it. Or just drop the input mask.

HTH

Aaron G
Philadelphia, PA
 
Karen:

In the combo box's AfterUpdate event procedure set the mask as appropriate

Select Case Me.YourComboBox
Case "USA"
Me.DriversLicense.InputMast = "<mask pattern for US license goes here>"
Case "Mexico"
Me.DriversLicense.InputMast = "<mask pattern for Mexican license goes here>"
End Select

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top