If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Conditional input mask on form
I'm largely self-taught (so hardly an expert) in Access 2002. I'm wondering
if it's possible to have a conditional input mask on a field in a form. My database keeps track of people who register for a conference. They can pay by credit card (Visa or MasterCard only), check or purchase order. I'd like to be able to have an input mask so that I only have to type the digits (1234567890123456) but the credit card numbers show up with easier-to-read dashes in the usual spots (1234-5678-9012-3456). However, when the method of payment is a check or purchase order, I don't want the dashes. Is it possible to do this? I'm thinking the method, if there is one, would involve use of the IIF function, and might be used on either the form, the table or a query. Any guidance would be greatly appreciated. Thanks! |
#2
|
|||
|
|||
Conditional input mask on form
In After Update event of the Payment Type put
If Me.PaymentType = "Credit Card" Then Me.AccountNum.InputMask = "0000-0000-0000-0000" Else Me.AccountNum.InputMask = "" End If Hope that helps! Jon Peck wrote: I'm largely self-taught (so hardly an expert) in Access 2002. I'm wondering if it's possible to have a conditional input mask on a field in a form. My database keeps track of people who register for a conference. They can pay by credit card (Visa or MasterCard only), check or purchase order. I'd like to be able to have an input mask so that I only have to type the digits (1234567890123456) but the credit card numbers show up with easier-to-read dashes in the usual spots (1234-5678-9012-3456). However, when the method of payment is a check or purchase order, I don't want the dashes. Is it possible to do this? I'm thinking the method, if there is one, would involve use of the IIF function, and might be used on either the form, the table or a query. Any guidance would be greatly appreciated. Thanks! |
Thread Tools | |
Display Modes | |
|
|