Results 1 to 14 of 14

Thread: Input Mask

  1. #1
    Join Date
    Apr 2004
    Posts
    182

    Unanswered: Input Mask

    I have 6 test boxes with the following input mask 99;;0 I am trying to force users to enter either 0, 1 or 2 digits. This works fine for the first box but then all the rest give the invalid entry error message no matter what I enter.
    Whichever one I enter data in first works and then the rest dont. I have tried just using validation but that doesn't stop users entering things like 1.5

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Try using:


    ##;;0



  3. #3
    Join Date
    Apr 2004
    Posts
    182
    [QUOTE=CyberLynx]Try using:


    ##;;0

    This still gives me the invalid entry problem the first box is fine but when I click on the second the error is generated even if I enter a valid figure.
    Last edited by livvie; 08-23-04 at 06:24.

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    This should work...Make sure there are no Validation Rules and Default Values (in both form and table).



  5. #5
    Join Date
    Apr 2004
    Posts
    182
    Quote Originally Posted by CyberLynx
    This should work...Make sure there are no Validation Rules and Default Values (in both form and table).


    Still the same problem its fine if you enter the value right the first time butif you change it then it will not accept the new figure no matter what it is. I also need validation as some of the boxes are for minutes so cannot be greater than 60.
    Last edited by livvie; 08-23-04 at 07:26.

  6. #6
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    First see if you text boxes are bound controls or just unbound controls.

    If they're bound with some data fields see if the datatype of the fields is not single or double - if they're change them to data type as byte to prevent user from entering any decimal values - and for the text boxes you can use the valiation as >=0 and <=60

    If they're not bound controls I would rather suggest to change the text boxes to dropdowns comboboxes and let them pick the number from 0 to 60 and ristrict them to only use listed items by selecting limit to list

    - Saqib

  7. #7
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    I suggested Byte datatype as it is able to store data from 0 to 255 and thus will be efficient memory wise as well and will save you from further programming for validation rules and other checks.

    - Saqib

  8. #8
    Join Date
    Apr 2004
    Posts
    182
    Quote Originally Posted by Saqib
    First see if you text boxes are bound controls or just unbound controls.

    If they're bound with some data fields see if the datatype of the fields is not single or double - if they're change them to data type as byte to prevent user from entering any decimal values - and for the text boxes you can use the valiation as >=0 and <=60

    If they're not bound controls I would rather suggest to change the text boxes to dropdowns comboboxes and let them pick the number from 0 to 60 and ristrict them to only use listed items by selecting limit to list

    - Saqib
    They are bound but changing them to numeric creates another problem for me as I concatenate the hours and minutes on another form to display historical records as converting beween decimal hours and actual time has proven impossible.
    I think I have solved it by setting them to size 2.
    Last edited by livvie; 08-23-04 at 08:26.

  9. #9
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    I don't understand how it is difficult to manipulate the purly numeric figures from 0 to 60 to sort, convert, concatinate or display as strings in a query or on a form or report.

    or maybe I'm rather not fully aware of your requirement of this particular appliation.

    - Saqib

  10. #10
    Join Date
    Apr 2004
    Posts
    182
    Quote Originally Posted by Saqib
    I don't understand how it is difficult to manipulate the purly numeric figures from 0 to 60 to sort, convert, concatinate or display as strings in a query or on a form or report.

    or maybe I'm rather not fully aware of your requirement of this particular appliation.

    - Saqib
    Or maybe I just dont know how to do it.
    This is where I concatenate the values
    SELECT EDATE, EMPLOYEE, OPERATION, DOWNREASON, JOB_ID,jorid, settingh, settingm ,SETTINGH +':'+ SETTINGM AS Setup, RUNNINHH +':' + RUNNINGM AS Run, DOWNHOURS +':'+ DOWNMINS AS Down, DOWNTIME, EMP_ID, PRODUCED, SCRAPPED, FINISHED FROM SQLACCESS.tblctjor WHERE job_id = 104174GROUP BY EDATE, EMPLOYEE, OPERATION, DOWNREASON, JOB_ID, jorid, SETTINGH, SETTINGM,DOWNHOURS,DOWNMINS,RUNNINGM,RUNNINHH, DOWNTIME, EMP_ID, PRODUCED, SCRAPPED, FINISHED ORDER BY EDATE DESC

  11. #11
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    If it is the matter of just displaying values in the required format you can concatinate the number values by using & sign instead of +. I mean the same query would become and will work fine if the hours and minutes are numeric

    SELECT EDATE, EMPLOYEE, OPERATION, DOWNREASON, JOB_ID,jorid, settingh, settingm ,SETTINGH & ':' & SETTINGM AS Setup, RUNNINHH & ':' & RUNNINGM AS Run, DOWNHOURS & ':' & DOWNMINS AS Down, DOWNTIME, EMP_ID, PRODUCED, SCRAPPED, FINISHED FROM SQLACCESS.tblctjor WHERE job_id = 104174GROUP BY EDATE, EMPLOYEE, OPERATION, DOWNREASON, JOB_ID, jorid, SETTINGH, SETTINGM,DOWNHOURS,DOWNMINS,RUNNINGM,RUNNINHH, DOWNTIME, EMP_ID, PRODUCED, SCRAPPED, FINISHED ORDER BY EDATE DESC


    - Saqib

  12. #12
    Join Date
    Apr 2004
    Posts
    182
    Using & in the query gives me the following error.
    Invalid operator for datatype. Operator equals Boolean AND, type equals numeric.
    I am using Access 2003 .adp

  13. #13
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    Can you upload your database with some sample data? that's then we can help you better...

    - Saqib

  14. #14
    Join Date
    Apr 2004
    Posts
    182
    Quote Originally Posted by Saqib
    Can you upload your database with some sample data? that's then we can help you better...

    - Saqib
    My db is just too big even stripped very bare. I'll have to figure out the problem.
    Thanks for your time and help Saqib

Posting Permissions

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