Command button to make a subform visible

juicybeasty

Registered User.
Local time
Today, 21:40
Joined
Feb 17, 2003
Messages
52
I'm struggling with this problem and I'm sure it's simple. I've search the forum without success for a solution, and have found it necessary to ask!

I want to have a command button which when pressed makes one subform visible and another not visible.

To do this I've been attempting to declare the subform as a variable first, using the following syntax:

Public Evidence As Object 'in general declarations section

Private Sub cmdEvidence_Click()

Evidence = Forms!fsubHIBOpsEvidence
Evidence.Visible = True

End Sub

The error message I'm getting is:

"Member already exists in a object module from which this object module derives"

What am I doing wrong????
 
Use an Option Group. See if the example helps.

IMO
 

Attachments

Users who are viewing this thread

Back
Top Bottom