Using Command Button to view forms from a main form

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a main table which I input data from the "mainform". This form shows
me key fields about an individual.

I would like to put command buttons on the "mainform" to view the following
tables in form views:

Childdetails
Career
Nationality
Postingdetails
Qualifications
Tasks
Remarks

I know I can do this using subforms on the "mainform" but to increase
privacy I would rather they were opened by a command button.

I know how to add the button to the form and I am aware that I will need to
link the forms to the main form probably using my ID fields. Having tried
this for 4 days I have come to my wits end.

When I click on the Command button it shows the form I need but it shows me
all the records for the invoked form but does not show me the records that
relate to the individual on the "mainform" unless I click forward on the
record button.

In short I would only like to see the records for the individual and not
anyone else. I.e. "mainform" open to Halliday's details then click Command
Button for Postings and only see the posting details for Halliday.

Please help

Dave
 
Yes, you can use command buttons on your main form to
open and view, add, delete data from synchronized,
related forms. Just be sure that all your tables have
primary keys and foreign keys and are linked in the
Relationships window. Use the Form Wizard to assist you
in creating a main form with a "Linked" form (not
subform, you'll have a choice in the Wizard). When it is
done, you will have a main form with a linked form that
is synchronized and opened with a button. Reverse
engineer what was done by the Wizard and apply same for
all the other forms you wish to open from buttons on your
main form. This should get you started.

Denny G.

-----Original Message-----
I have a main table which I input data from
the "mainform". This form shows
 
Thanks Denny,

This may seem very stupid but I have tried to create the suggested main form
with a linked form but cannot find the wizard to do this. I have searched
the help files to look for assistance in creating a linked form but it only
gives details on subforms. How thick am I!! I'm using Office XP.

Many thanks in anticipation

Dave
 
OK David, follow along here:
1. Open your database container and click on the Forms
object.
2. Click on the "New" icon in the tool bar in your
database container. This opens a "New Form" dialogue
screen where the wizard is.
3. In the upper-right window of the New Form dialogue,
find "Form Wizard" and highlight it.
4. In the smaller window below, Choose the table or
query, using the drop-down arrow, upon which you wish to
build your main form.
5. Click the OK button. The "Form Wizard" screen now
appears.
6. Move the fields you desire on the main form from
the "Available Fields" window to the "Selected Fields"
Window.
7. Now, BEFORE you leave the "Form Wizard" screen, go up
to the "Tables/Queries" combo box and select the next
table or query upon which you want to base you linked-
synchronized form.
8. Select all fields from left window and move them over
to the right window for the linked form just as you did
for the main form in step 6.
9. Now, click on the "Next" button at the bottom of the
Form Wizard.
10. You now have a different view of the Form Wizard.
Notice at the bottom of this screen, you have two radio
buttons. Click in the one that says "LINKED FORMS."
11. Click on "Next" at the bottom of the Form Wizard. In
the next and you are done.
12. Perform the steps required by the next couple of
screens, click on "Finish," and you have a start of what
you are trying to do--A MAIN FORM WITH A BUTTON that
opens a linked-synchronized form providing you set up the
relationship between your tables/queries before you
started.

Good Luck, (I also am using Access XP)

Denny G.
 
Back
Top