By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,154 Members | 2,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,154 IT Pros & Developers. It's quick & easy.

Conditional input mask on form

P: n/a
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!
Oct 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ray
Jon,

What about a change of mask when the payment type is updated?

So, in the AfterUpdate event of the Select
CreditCard/Check/PurchaseOrder field, set the mask of the card/check/PO
to whatever you need:

Select case me!PaymentType
Case "CC"
me!PaymentNumber.InputMast = "000 ...... whatever"
Case "CH"
me!PaymentNumber.InputMast = "00990 ...... whatever"
Case "PO"
me!PaymentNumber.InputMast = "9999000 ...... whatever"
end select

Ray

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!
Oct 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.