2

I have a mask that looks like 0\.00\.0000 which is used to force serial numbers to look like 1.20.0034. The problem I have is that the dots (.) are not put in the database field. How can I use an input mask and make sure the extra characters are put in the database field? We use Access 2007.

I have tried the input mask 0.00.0000 which does insert the . characters into the field. However when displayed the forms show , because that is the decimal mark in dutch....

6
  • 1
    Is that field being saved as text or number into the table?
    – CharlieRB
    Jun 20, 2012 at 12:21
  • It is a text field
    – Wouter
    Jun 20, 2012 at 12:22
  • I used that input mask in a table for at text field then created a text box input on a form and it saves it as it should. Did you create the input mask in the table or on the form?
    – CharlieRB
    Jun 20, 2012 at 12:55
  • Just a thought, I just saw this in the help section of Access referring to the Input Mask properties; "Decimal placeholder and thousand, date, and time separators. (The actual character used depends on the settings in the Regional Settings Properties dialog box in Windows Control Panel)." That could explain why the , replaces the . without the backslash character preceding it.
    – CharlieRB
    Jun 20, 2012 at 13:02
  • Which is weird because it is a text field.. Punctuation is not the same as decimal marks obviously.
    – Wouter
    Jun 21, 2012 at 15:10

2 Answers 2

2

add ;0 to the mask to give 0\.00\.0000;0

This tells Access to save the literal characters along with the data

There is a third parameter where you can change which character is used to indicate data entry, so if your mask was 0\.00\.0000;0;# then access would display #.##.#### in the entry field, and store the dots with the text entered.

2
  • When I use 0\.00\.0000;0;# as input mask forms show , as separator when adding a new entry. The literal characters are saved to the database as . though. This is odd.
    – Wouter
    Jun 21, 2012 at 15:11
  • I have no idea why that would happen - I'm in US, so don't see any changes if I use slashes or not
    – SeanC
    Jun 21, 2012 at 18:30
0

change in regional settings of Control Panel to compensate for different language

1
  • Can you explain how this will fix the OP's problem? As it stands, your answer might be deleted as it is too low quality.
    – Cfinley
    Oct 26, 2015 at 4:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .