Can You Open A Subform w/ a Command Button?

Melody

Registered User.
Local time
Today, 01:51
Joined
Aug 11, 2000
Messages
47
O.K. - I'm still new at this, I don't understand this. Can't you open a subform with a command button? I created and named my subform (Subform - Reimbursement). When I invoke the Command Button Wizard and it lets you select which form you want opened - This Subform is not listed. ??????????
 
when you create the form using the form wizard the second screen you are presented with asks
'How do you want to view your data?'

If you look to the bottom right corner of the window you will see two dot. buttons
(Form with subform(s) and Linked forms)
Select linked forms and the finished form will have a subform link button created for you.

Alex
 
I am using the subform wizard, and I need to use a form that already exists (Reimbursement Form) when I select this option, and the form I want to use, I am not given the option of Form w/ Subforms or Linked Form. My subform is created fine. Everything works fine, except that I don't want my subform to show up on my form. I want to access the subform through a command button. That's where the problems start. ?????
 
You could set the Visible property of the subform control on your main form to No thereby hiding the subform. You could then use a toggle button to make the subform Visible or Invisible, however you like.....
 
JACK - Thanks for your response. My problem is - I want there to be a button on the form that is visible all the time and says Reimbursement Address. Info. in this subform is required, so I want the end user to see this button at all times. ???
 
Melody -

The Toggle button will be visible at all times. Pressing the button will merely 'unhide' or 'hide' the subform for viewing. If you are having trouble with this email me directly and I will create a small demo for you....
 
JACK - Thanks! It worked great! I was thinking about something different! So - Here's my newest dilemma (there's always something!!): When I'm in my subform, the record is not matching up with the related record on my main form. My Master link is the primary key in the main table for my main form (CustomerID), My Child link is the primary key (ReimbursementID) in the table behind my subform. I have both of these selected correctly in the Subform properties. They are both AutoNumber fields, and in my Relationships, this is how they are related. Does anyone know what I'm doing wrong???????
 
Melody - You have your relationship and Master/Child links set up incorrectly. The primary key in your main table should be related to a foreign key on your other table, not the primary key (autonumber) on the other table. For an example take a look at the Northwind db that comes with Access and look at the relationship between Products and Order Details. Then look at the individual tables in design mode.
 
JACK - O.K. - I've now switched my Relationships back to the way they originally were: CustomerID related to CustomerID. I've also changed the Master/Child links back to their original: CustomerID (primary in Customer table) to CustomerID (foreign in Reimbursement) - Still no luck!! And I've tried every combination of join type in my Relationships. I am just lost!!!! I've also looked at other databases and tables, and tried to mimick them. I am really confused as to why this isn't working.
 
Melody - I haven't a clue as to what is going on. If your db is not to huge and does not contain confidential or propritary information you can zip it and email it to me and I will take a look at it tomorrow (Tuesday). Sorry to take so long to get back to you. Very busy day....

Jack
 
Jack - I just e-mailed my db to you. Let me know if you get it o.k. Thanks!!
 

Users who are viewing this thread

Back
Top Bottom