Consulting

Results 1 to 6 of 6

Thread: When field is unchecked, all subform fields empty

  1. #1

    When field is unchecked, all subform fields empty

    Hi everyone. I'm hoping you can help me with an issue I'm having with a Microsoft Access Database. I am not very familiar with the program or with code, so there may be a simple solution that I am unaware of at this time.
    I am manipulating an existing database to improve the way that data input into forms so that there are less errors and no missing information. The current form that I am working on is to enter information about testing being done. If there is a leak found while testing, then it is necessary to have the information about the location of the leak and the type of leak. Leaks are not found on every line when testing is done, so I have a lot of fields that are required but only when a leak is found.
    To accomplish this, I created a subform that opens when the check box "Leaks" is selected. The problem is that whenever there are no leaks, the record will save the information that was last entered in the subform along with the new information about the testing where no leak was found.
    Is there a code that would say if the "Leaks" check box is not selected, then all fields in the subform are empty?

    Thank you in advance for your help, and please let me know if I was unclear about anything.

  2. #2
    Should like the Sub Form's Master and Child Link fields are not set. This is used to link the data in the sub form to the data in the parent (Master) form.
    Boyd Trimmell aka HiTechCoach
    Microsoft Access MVP -2010-2015

    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    I have them linked with master child. Is there something else that I need to do in addition to that?

  4. #4
    I assume that the Sub form is editing a child/related table. Is that correct?

    I would check the control source for all the sub form's controls (text box, etc). Make sure they are bound to a field in the record source.
    Boyd Trimmell aka HiTechCoach
    Microsoft Access MVP -2010-2015

    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  5. #5
    Ok, I'll check that.

    Thank you for your help!

  6. #6
    VBAX Newbie
    Joined
    Jun 2013
    Location
    Sydney
    Posts
    3
    Location
    I think the issue is one of table design. Could you post the schema as I believe it will provide a clue to the issue.
    Last edited by firemonkey; 06-19-2013 at 04:36 AM.

Posting Permissions

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