Enable/Disable Button based On Field filled in completely

J

Jack

I have a Form with a CreditCard Field whose input mask is changed dpending
what Card is selected in an option box (AMEX, VISA, MC).
I also have a Card Expiary Field
I would like to have a button on my form disabled until the
complete Card # is filled in and the Expiary Date is also filled in.
Currently the user gets a Standard message if they don't completely fill in
either of these feilds according to the Input mask.
But how can I have my Button disabled untill the Card & Expiary
Fields are completed properly.
In other words can I Trap this event; is what I think I am trying to ask?

I DON't want to have the Fields Required Property set to Yes
because there are other Selections in the option box
i.e(Cash, Cheque, Complimentary) That would have the
Credit Card Field Not Enabled/Visible.
Therefore no entry required.


Thanks
 
B

Bill Taylor

Disable the button with the on current event of the form. then on the exp
date field use the beforeupdate event to check the cc number and exp date
for validity. If ok then set button to enabled. else return to field that
needs correcting.
 
J

Jack

Thanks for the reply.
I guess thats what I am asking for help with, albeit in a long winded way;
sorry.
How do I check for Valididty.
Because if the Field isn't completely filled in by the user,
Access prompts the user with a Standard message because of the input mask.
 

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

Top