Calling Subform when Check box = Yes

  • Thread starter Thread starter akling
  • Start date Start date
A

akling

I have not coded in Access or VB since 97... and I have
forgotten quite a bit...

1) Could I write an Event Procedure on the Event "On Exit"
to call a subform that will "pop up"?

2) If so... What would the VBA code look like?

3) And suggestions of a good resouce for just some basics
on VBA language (i.e. syntax rules). I've looked on-line
and have yet to find exactly what I am looking for. I
could figure this out on my own if I would read the code
to begin with.

Any help greatly appreciated... New job... Deadline is
tomorrow....

akling
 
Kind of late in asking aren't we.

I don't think you can call a subform without its related main form. These
are usually one form and data is entered first to the main form and then the
related data to the subform. You are better off not trying to separate
these two forms.
 
Hi

Hope I understood your question....

Set the visible property of your sub form to false:
Form_frmSubForm.Visible = False

Then put a check box on your main form, create an "on lost focus" event with the following code:

If Check1 = True Then
Form_frmSubForm.Visible = True
End If

When the person click the tick box and moves on, the subform will appear. Hope it helps!!

Give me a shout - I learnt the hard way and am willing to share!!!

David
 
David,

Would you mind if I contacted you by email?

akling
-----Original Message-----
Hi

Hope I understood your question....

Set the visible property of your sub form to false:
Form_frmSubForm.Visible = False

Then put a check box on your main form, create an "on
lost focus" event with the following code:
If Check1 = True Then
Form_frmSubForm.Visible = True
End If

When the person click the tick box and moves on, the
subform will appear. Hope it helps!!
 
yes, you would put this code in the OnExit event of whatever control yo
are exiting:


Code
 
yes, you would put this code in the OnExit event of whatever control yo
are exiting:


Code
 
Back
Top