PDA

View Full Version : When field is unchecked, all subform fields empty



SNicole0314
06-12-2013, 12:29 PM
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. :biggrin:

HiTechCoach
06-13-2013, 06:57 AM
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.

SNicole0314
06-13-2013, 07:46 AM
I have them linked with master child. Is there something else that I need to do in addition to that?

HiTechCoach
06-13-2013, 08:03 AM
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.

SNicole0314
06-14-2013, 08:43 AM
Ok, I'll check that.

Thank you for your help!

firemonkey
06-19-2013, 04:25 AM
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.