Access 2000 - Form that only appears when particular field is pick

B

Brave_Sir_Robin

Hi,

I want to create a sub form that will only appear when a particular field is
selected. For example: If a boxed called "Employed" was ticked then another
form would appear within the existing form and stay there for that record.

I am running Access 2000.

Thanks for your help
 
K

Ken Snell \(MVP\)

Use the AfterUpdate event of the "Employed" control to set the Visible
property of the subform control, based on the value of the control (assuming
the control has a True or False value):

Private Sub Employed_AfterUpdate()
Me.NameOfSubformControl.Visible = Me.Employed.Value
End Sub
 
A

Al Campagna

Brave,
Create your subform, place it on your form, and test that it functions
properly.
Then set the Subform's Visible property to No.

Use the AfterUpdate event of Employed... to...

Private Sub Employed_AfterUpdate()
If Employed = True Then
Me.frmYourSubformName.Visible = True
Else
Me.frmYourSubformName.Visible = False
End If
End Sub

You'll also need the exact same code in the form's OnCurrent event.

--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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