none
How to edit records in a recordset fora continuous form RRS feed

  • Question

  • I have a continuous form that i unbound.  When I execute the query, thy come back correctly.  I would like to know how I could loop through them and based on the value, change what is displayed in the unbound form control.  I.E. after the query runs, I want to check all of the records and look at field XYZ.  If field XYZ is NULL or empty, then display "N/A" in the form field, otherwise display what is on the table.  I have 10 records that are returned and the just updates the first record that was returned.  I know that I need to code how to loop through and check field XYZ for all of the records and set the value for all 10 records correctly for the 10 form records.  Can someone let me know how I should be coding this?  Thanx in advance.
    Tuesday, January 9, 2018 1:01 AM

Answers

  • If field XYZ is NULL or empty, then display "N/A" in the form field, otherwise display what is on the table.

    Hi Dallj_351,

    This question is about the same as in your other thread: Display a Caption in Form Field when it is Bound to a table.

    In continuous forms you display what is in the record. So if you want to display "N/A" where the field is Null, you can write that value "N/A" in the field. In that case no additional code is needed to do any tricks.

    This works well for text fields, but not for numeric or date fields. The you need some tricks to hide the actual value, and display an other. FOr a few simple cases this works well, but it becomes soon very complicated.

    What is your added value to "replace" an Null value by "N/A"?

    Can you solve your problem with conditional formatting?

    Imb.

    • Marked as answer by ballj_351 Friday, March 2, 2018 12:16 AM
    Tuesday, January 9, 2018 7:52 AM

All replies

  • Hi,

    Before we can go any further, we'll need to make sure we're on the same page. Can you post a screenshot of your form with data? As far as I know, a continuous form cannot be unbound. Needless to say, I am a little confused by your first statement.

    Tuesday, January 9, 2018 3:38 AM
  • If field XYZ is NULL or empty, then display "N/A" in the form field, otherwise display what is on the table.

    Hi Dallj_351,

    This question is about the same as in your other thread: Display a Caption in Form Field when it is Bound to a table.

    In continuous forms you display what is in the record. So if you want to display "N/A" where the field is Null, you can write that value "N/A" in the field. In that case no additional code is needed to do any tricks.

    This works well for text fields, but not for numeric or date fields. The you need some tricks to hide the actual value, and display an other. FOr a few simple cases this works well, but it becomes soon very complicated.

    What is your added value to "replace" an Null value by "N/A"?

    Can you solve your problem with conditional formatting?

    Imb.

    • Marked as answer by ballj_351 Friday, March 2, 2018 12:16 AM
    Tuesday, January 9, 2018 7:52 AM