Opening another form at a specific record, based on current form and record

tdriscoll

New member
Local time
Today, 09:24
Joined
Apr 13, 2017
Messages
5
Hello,

I have a 3-tier database (grandparent, parent and child), which I would like the end user to be able to navigate using command buttons.

Currently, I know how to add command buttons using the event builder that can open another form, and at a specific record. So far so good.

However; there are 6 grandparents, 9 parents, and approx. 40 children. Not all parents are related to all the grandparents, and not all children are related to all the children. My current buttons display on a form for all records, including those which do not relate to the record the button will open.

I have set up the many-to-many relationships between each generation/tier.

From the grandparent/parent forms, I would like to have command buttons allowing you to go the next level down, to the parent/child related to the grandparent/parent record displayed.

As I scroll between records, I would like for these buttons to stay the same, but their attached events to change.

I'm imagining this should be possible somehow using the relationship join tables and/or record ID numbers.

If this downward journey is possible, it follows I could go up the family tree in a similar manner.

For Example: From Grandparent 1, I want to be able to open the parent form at records 1 or 3. From Grandparent 2, I want to be able to open the parent form at records 2 or 3. The grandparent form would then only need 2 or 3 buttons.

Likewise, from Parent Form record 1, I would like to be able to go the Child form, and open records 1, 2, 3, 4, or 5 etc.
From Parent record 9, I would like to be able to open Child form, record 35, 36, 37, or 38....

Many thanks in advance,

Tom
 
Hi Gizmo,

I've attached an image of how I am planning out this database.

Is the idea of a button with variable events in this layout feasible?

I will also look into sub-forms to see if that could be the answer.
 

Attachments

  • db_plan.PNG
    db_plan.PNG
    22.8 KB · Views: 225
Just to say, if you succeed with this project, it could make a useful addition to the sample databases section when complete
 
Ok, I suppose my question boils down to:

Can a button on a form have different outcomes depending on the record being viewed?

In layman's terms, it might translate as:

I have a list of people, and know what each of their favourite hobbies are. I want to be able to go from the person, to their favourite hobby. How might I do this?

Something like: from one button on the people form, open the hobbies form, at the appropriate record. The difficulty comes in the button linking to a different hobbies record from each people record.
 
Last edited:
I have a list of people, and know what each of their favourite hobbies are. I want to be able to go from the person, to their favourite hobby. Who might I do this?

I think you've answered your own question. You have lists.

List/combo controls hold data and can perform actions based on the selected value(s).
 

Users who are viewing this thread

Back
Top Bottom