Change Format of a Text Box

goaksmith

Registered User.
Local time
Today, 16:17
Joined
Jul 31, 2002
Messages
74
I have a combo box A where I have different ways of shipping (ie. Fed Ex, UPS, and Airborne Express) I also have a text box A where the account numbers for the above services go. The problem is that I want to change the format of the cell to make it fit the shipping service chosen.

For example.

If in [combo box A] Fed Ex is selected then I want the format of [text box A] to be ####-####-#.
If in [combo box A] Airborne Express is selected then I want the format of [text box A] to be #########. (9 #'s)
If in [combo box A] UPS is selected then I want the format of [text box A] to be ######. (6 #'s)

I have access 97 installed on my computer which I know is more limited in conditional formatting. Any help, even a this isn't possible, would be greatly appreciated.
 
Use a SELECT CASE statement in the After Update() event of the combobox to change the textbox's Input Mask

ie.

Code:
Select Case Me.cboYourCombo
    Case Is = "FedEx"
        Me.txtYourTextbox.InputMask = "####-####-#"
    Case Is = "Airborne"
        Me.txtYourTextbox.InputMask = bla bla bla
    all cases checked for
End Select
 
Perfect

Thank you so much. That is exactly what I was looking for and it worked wonderfully!
 
Perfect

Thank you so much. That is exactly what I was looking for and it worked wonderfully!
 

Users who are viewing this thread

Back
Top Bottom