Subform problems

Grimmers

Registered User.
Local time
Today, 10:04
Joined
Aug 1, 2002
Messages
21
I have a membership form that contains membership details and a linked subform that contains member details as there are multiple members per membership. I need a button in the membership form header to open a seperate form related to the member subform. I've tried lots of things but am in brain fade mode (getting late!). Also reading forum regarding only 2 subforms per form. Is this true?

cheers and goodnight,

David
 
I'm not sure if this will help, because I am pretty new at this, but I thought I would give it a shot.

I think I have a similar set-up. I have 2 main tables with forms, Institutions and Contacts. The Contact form is a subform of the Institution form. On the contact form, I have created several buttons that open other forms (such as different types of supply orders, link updates, etc). All of these forms are related to the contact. My original instinct was to try and create may subforms to view all the info at once.

However, instead of using multiple subforms, I created a new form for each data-set. Each new form I created contains the contact information again and 1 subform per table. That way I can view many different sets of related data without overloading my database.

Hope that helps. If not, good luck getting more info from the experts out there!
 
Stacey,

Thats OK, but I am trying to get a button on, in your case, the institution form header to reflect the contact details
 
David, do you mean something like this?
Code:
strCondition = "[memberID] = " & Me.mySubForm!memberID
DoCmd.OpenForm "myform", , , strCondition
Dave
 
Dave,

I get variable not defined error with your code, not great on code myself!!!

cheers,

David
 
You will have to change these values to suit your own data.

strCondition = "[memberID] = " & Me.mySubForm!memberID
DoCmd.OpenForm "myform", , , strCondition

memberID will be the field in your members table (primary key)
mySubForm is the name of your subform control (not the name of the underlying form)
myForm is the name of the form you want to open

Also add a :
Dim strCondition as STRING
at the top

Hopefully that will solve the problem

Dave
 

Users who are viewing this thread

Back
Top Bottom