Yes/No field to call subform within a form?

gpbuckley

Gerry
Local time
Today, 00:15
Joined
Apr 8, 2010
Messages
16
Hi: This is the last step on 1st phase of a database which I have been asked to do. Basically its a form used for incoming inspection dealing with three main category type of materials: pcb, metal and other. In the main form (general_rev2) the field material category has a list value of the three categopries. What I need is when pcb category is chosen then a subform pcb is opened with specific inspection criteria for this category. I have been trying to do this for some days now and am getting nowhere. Any ideas on how to do this?
 
Last edited:
You will need to have the Sub Form's Visible Property set to False for new records, and then set it to True, when the appropriate category has been selected.

You will need to preform a logical test on the value of your Category field in both the Form's OnLoad and OnCurrent events to determine if the Sub Form's Visible property should be True or False.
 
You will need to have the Sub Form's Visible Property set to False for new records, and then set it to True, when the appropriate category has been selected.

You will need to preform a logical test on the value of your Category field in both the Form's OnLoad and OnCurrent events to determine if the Sub Form's Visible property should be True or False.

Hi John and thanks for the email. I am an amateur user for access
icon11.gif
and am not familiar with the above. Can you expand for me (in "access for dummy language"
icon7.gif
?

Thanks a million for the help
 
Have a look at the attached sample. See what happens as you scroll through the records and what happens when you check and uncheck the check box on the main form. I have quickly bashed this DB from a sample I did that had other functionality so there will be buttons and code that is irrelevant to this current discussion please ignore them.

In particular look at the form FRM_Country's On Current event and the Check Box Show Port's OnClick event. Also book mark this link for future reference on the correct syntax for referring to Sub Forms and their controls.
 

Attachments

Users who are viewing this thread

Back
Top Bottom