Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    May 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2003: type mismatch on date field due to language settings (French)

    Hi all,
    We've got an Access 2003 db that throws a 'type mismatch' error on a date field, and it only does that on pc's using the French language regional settings. We can run the same db successfully on a pc with the English settings. The field throwing the error is displaying '13-juin-2011' date format instead of '13-june-2011'. How can we set the form to display the date in French format without the type mismatch error, while still allowing the English-setting pc's to work? BTW, this could affect more than a few dates in our db so a db-wide setting would be most helpful as opposed to coding conditional formatting on each date field.
    Thanks in advance!

  2. #2
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    Hi,

    Welcome to the Lounge.

    In what circumstances is the error thrown and what error message is shown?

  3. #3
    New Lounger
    Join Date
    May 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    re: type mismatch timing, msg

    Hi, thanks for the quick response! The error occurs when the data is first displayed (user picks a specific record from a drop-down list) and the date field is apparently not happy with the French format. The exact error is 'Type mismatch', with a title bar showing 'Microsoft Office Access'. The exact same data can be displayed successfully on a pc with an Enlish setting instead of French. The db was originally done in Access97 and converted to 2003 in the past year or so.

  4. #4
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    I guess you need to validate the date before you can allow the update to occur, probably using the BeforeUpdate event. There are several possibilities to do that.


    You can find a lot of code examples regarding date validation and manipulation here: http://www.bigresource.com/VB-Valid-...4qyivwD1P.html

  5. #5
    New Lounger
    Join Date
    May 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2003: type mismatch on date field due to language settings (French)

    not exactly getting it... There is no update involved; the type mismatch is thrown as soon as the form displays. The data in the database was put there using an 'English-setting' pc and they're trying to display (read-only, no updates) the data on French-setting pc's.
    Seems like there must be something in the language settings (maybe a way to format date display on the French side as it is displayed) or at least a way on the db startup to specify date format. Any other ideas?

  6. #6
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    What are the settings for the form field that triggers the message?

  7. #7
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Per chance have you specified a Format and/or Input Mask in the table definition?
    DBTableDef.JPG
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  8. #8
    New Lounger
    Join Date
    May 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2003: type mismatch -- solved!

    hey, thanks again for the responses. We did not have a format or input mask on the table definition. We did, however, realize that it was the regional settings in Windows that was causing the type mismatch. We changed the Windows 'Regional Options' under the 'Regional and Language Options' 'region' setting from French Canada to English from the Control Panel, and it worked. That didn't have any apparent affect on the French keyboard settings and to-date has not caused any other problems.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •