Hello, all.
A long story short, to try to keep it making sense.
I have a situation in a form that I could not find a solution (or actually understand why is not working).
Due to reasons that would take too long to explain, I have a kind of different Main Form – Subforms structure (one of the main reasons actually is that continuous forms can’t have Subforms). I show it “graphically” below, in hope that it will make it easier to visualize:
Main Form
---------------------------------------------------------
| |
| Subform A Subform B |
| --------------------- ---------------------- |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | ---------------------- |
| | | Subform C |
| | | ---------------------- |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| --------------------- ---------------------- |
| |
---------------------------------------------------------
Subform A is not directly linked (parent-child) to the Main Form; however, they share a field (unique Foreign Key in the Main Form dataset) that can be used to link them. Subforms B & C are linked to the Main Form through parent-child links.
Records are shown to users on all three Subforms, but not on the Main Form (which is based on a linking table connecting the other three forms tables)
The actual “driver” of record navigation is Subform A. All existing records are shown (continuous form); a Boolean field indicates Products (records) that are in use for a given project. The desired record navigation is that after the user goes to a record that it is in use, the other two Subforms will show the corresponding records.
Record movement on the Main Form is controlled using the foreign key from Subform A. A recordset.find (Subform A foreign key) is used to locate the corresponding record on the Main Form, Subforms B & C records are repositioned without problem due to the parent-child relationship with the main-form. Gold, all good here.
Now the real problem: records without a corresponding foreign key on the Main Form (items not-in-use on Subform A). when the current record on Subform A is a not-in-use record, the recordset.nomatch for the Main Form is true. I tried to no avail to use that to force the record position on the Main Form to move to a “no record” location (before or after respectively first or last record), which by its turn would force Subforms B & C to show no records.
What actually happens is that the main form still shows the record corresponding to the last in-use product visited in Subform A. Naturally, Subforms B & C also show the records that are linked to the key on the Main Form. Lead, not good at all here.
Sorry for the long story. What am I missing? I know that is probably something easy and stupid, but I can’t see it.
Or the whole navigation strategy is bad and I should rethink it all (which I really hope is not the case)?
Any help is always apreciated!
Thx,
4N6MSTR
______________________________________________
If you don't know where you are going
It does not matter how fast you are
You will never get there
A long story short, to try to keep it making sense.
I have a situation in a form that I could not find a solution (or actually understand why is not working).
Due to reasons that would take too long to explain, I have a kind of different Main Form – Subforms structure (one of the main reasons actually is that continuous forms can’t have Subforms). I show it “graphically” below, in hope that it will make it easier to visualize:
Main Form
---------------------------------------------------------
| |
| Subform A Subform B |
| --------------------- ---------------------- |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | ---------------------- |
| | | Subform C |
| | | ---------------------- |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| --------------------- ---------------------- |
| |
---------------------------------------------------------
Subform A is not directly linked (parent-child) to the Main Form; however, they share a field (unique Foreign Key in the Main Form dataset) that can be used to link them. Subforms B & C are linked to the Main Form through parent-child links.
Records are shown to users on all three Subforms, but not on the Main Form (which is based on a linking table connecting the other three forms tables)
The actual “driver” of record navigation is Subform A. All existing records are shown (continuous form); a Boolean field indicates Products (records) that are in use for a given project. The desired record navigation is that after the user goes to a record that it is in use, the other two Subforms will show the corresponding records.
Record movement on the Main Form is controlled using the foreign key from Subform A. A recordset.find (Subform A foreign key) is used to locate the corresponding record on the Main Form, Subforms B & C records are repositioned without problem due to the parent-child relationship with the main-form. Gold, all good here.
Now the real problem: records without a corresponding foreign key on the Main Form (items not-in-use on Subform A). when the current record on Subform A is a not-in-use record, the recordset.nomatch for the Main Form is true. I tried to no avail to use that to force the record position on the Main Form to move to a “no record” location (before or after respectively first or last record), which by its turn would force Subforms B & C to show no records.
What actually happens is that the main form still shows the record corresponding to the last in-use product visited in Subform A. Naturally, Subforms B & C also show the records that are linked to the key on the Main Form. Lead, not good at all here.
Sorry for the long story. What am I missing? I know that is probably something easy and stupid, but I can’t see it.
Or the whole navigation strategy is bad and I should rethink it all (which I really hope is not the case)?
Any help is always apreciated!
Thx,
4N6MSTR
______________________________________________
If you don't know where you are going
It does not matter how fast you are
You will never get there