Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1

    Answered: Doubles and Regionalization Issues

    Hi,

    I am programming for a food bank in the Province of Quebec (French and French regional settings), but I am an anglophone and my machine at home uses English Regional Settings. As you may know, the French setting uses a comma instead of a period as a decimal place. In one form, I try to test input by using isNumeric(), and I use a raw insert command to add a new record (i.e. DoCmd.RunSQL "Insert into....."). I am having trouble inserting a number with a decimal place (e.g. 9.5).

    The behaviour is interesting. The form accepts a period for a decimal place, but then automatically updates the period to a comma. Somewhat randomly, this updating either triggers the isnumeric() test OR throws an error in the SQL insert statement (i.e. too many variables, because of inclusion of the comma).

    I suppose I will spend some time experimenting with various ways to format the input before it is tested or inserted. Is there a standard way of dealing with the doubles problem?

    J. Smith
    Gatineau, Quebec

  2. Best Answer
    Posted by praxis1949

    "Greetings all,

    This seems to mainly be a timing issue. Testing against a null tends to be fatal!

    - test for null first
    - replace comas with periods (REPLACE()!)
    - test for isnumeric
    - convert to double (Cdbl()).
    - INSERT

    I think this is working.

    Regards

    John S"


  3. #2
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1
    Greetings all,

    This seems to mainly be a timing issue. Testing against a null tends to be fatal!

    - test for null first
    - replace comas with periods (REPLACE()!)
    - test for isnumeric
    - convert to double (Cdbl()).
    - INSERT

    I think this is working.

    Regards

    John S

Posting Permissions

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