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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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."
 
Back
Top