Calling Subform when Check box = Yes

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
 
G

GVaught

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.
 
D

David

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
 
A

akling

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!!
 
Y

yakule

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


Code
 
Y

yakule

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


Code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top