Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 9th, 2006, 08:45 PM
Jon Peck
Guest
 
Posts: n/a
Default 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  
Old October 10th, 2006, 06:05 AM
ray@aic.net.au
Guest
 
Posts: n/a
Default Re: Conditional input mask on form

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:
Quote:
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!
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles