Here in the Netherlands a phone number is xxx-xxxxxxx or xxxx-xxxxxx , alway's 10 digits, how can i make my input-mask the best way for this situation? Perhaps it is not possible?
That's a tough one. I've done videos before showing how to deal with input masks for phone numbers of varying lengths, like in Mexico. But you've got the same length with different formatting. Is there any rule for WHEN you have each format? Like, all numbers starting with 2 to 5 have THIS format and 6 to 9 have THAT one? Or people from THIS city have format A and THAT city have format B? If you can teach me what the rule is, I can show you how to do it in Access.
The only thing I can think of is that you enter in the 10 digits and then afterwards PICK which format you want, perhaps with a combo box? If people just have to pick whichever format they were assigned, then that might be the only way to do it. OR, just don't use an input mask. They're not really necessary. I haven't used a phone number input mask in my databases in a long time. Then again, I barely use phone numbers. It's all email now. :)
C.l. SchotOP
@Reply 5 years ago
Here every city have a phone number with 10 digits, The city of Rotterdam has a phone number like 010-4123456 and the city of Gouda has a telephone number lik 0182-123456. they all start with a zero at the beginning. The three or four digits before the - stand for the city where the person lives. The - makes the numbers better readeble.
OK. What you would have to do in that case would be to make a table with a list of the cities and what the input mask is for each city. Then, in the customer form when the city is selected from a relational combo box, you can apply that input mask with an AfterUpdate event. You'll also need an OnCurrent event for when you move from record to record. I'm afraid I can't think of any NON-programming way to do this. I see that you're just a beginner user, so this may be way over your head right now, but keep learning. You'll get there.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Beginner 3.