How do I disable errors in textboxes before the user gets to enter data in them - InfoPath Dev
in

InfoPath Dev

How do I disable errors in textboxes before the user gets to enter data in them

Last post 10-08-2009 06:25 AM by Kumaran Pandourangan. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-05-2009 09:29 PM

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    How do I disable errors in textboxes before the user gets to enter data in them

    Hi there,

    I'm back!!!!!

    I have a issue with a new simple InfoPath form.

    What I have is, a form with 8 fields :- 

    record number,  record date, first name, last name, telephone, Priority (H,M,L), Problem. 
    I am using a local MS Access database.

     

    Record number is the key field and cannot be blank.

    How can I

    A) 1. ensure that I have an automatic incremented number added to the document number field.

         OR,

         2. Make sure the user does not forget to enter a value in the document number field. The user will key in this value to find the record.

         In the first case, I also want to be able to bring up a warning message, when the user leaves the field without entering a value. Not when they try to save the record.

    B)  Ensure that a data is entered into the date field, Is there some function I can use to automatically enter a data, not necessarily TODAY's date.

    All response are most happily welcomed.

    Regards
    Ian

     

  • 10-06-2009 08:33 PM In reply to

    Re: How do I disable errors in textboxes before the user gets to enter data in them

    Hi Ian,

     A) In order to have an automatic number increment, you have to use "Expression Box" control.  Once you place the "Expression Box" control in your form,

    go to the properties of the control  and type "position()" in XPath text box.  In the Format as drop down, make sure you have selected "Whole Number"

    B) For the date field, when you use the date picker control, to make sure the date is entered, you can select the check box which says "Cannot be blank" in

    the properties.  To populate default value in the date field, you can use "today()" or "now()" date function in the default value property.

     Regards

    Kumaran

  • 10-07-2009 10:12 PM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: How do I disable errors in textboxes before the user gets to enter data in them

    Hello Kumaran,

    Thanks for the reply.

     

    With question A,  I will be creating records, and the key field for the record, is the automatically generated number I am referring to. 

    I have kinda solved it by using the auto increment in MS Access.

    When the secretary enters the record, and then saves it. Then, and only then, is the record number field value created, I believe. 

    Maybe, what I should be asking is how can I rpeview that last record and get its record number, then add that to the record myself.

    But then, if the user cancels the request. The number is lost.  Maybe just staying with what I have done, may be the best option.

     In respect to the second question, the date will always be todays date, the date the record was created. So that issue was resolved also.

    Finally, if you know another way around for the first question and what I say above, that would be great.

    Regards,
    Ian

  • 10-08-2009 06:25 AM In reply to

    Re: How do I disable errors in textboxes before the user gets to enter data in them

    Hi

    If the secretary is the only person who will be entering the data then you can calculate the next record number by yourself and show them before saving it to the db. 

    So the auto increment number in access is same as the one you generated in InfoPath.

    But if there are more than one person saving record in your access db, then you better stay with your option.

    Regards

    Kumaran 

     

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.