I have been working on setting up an Access database and thought I had everything
figured out (especially thanks to some help from folks here), but I have been running
into a problem that I haven't been able to solve. It's taken me about a month to try
various options without success -- luckily it's only my self-imposed deadline I've
missed.
Here's the question. I have a main form that I have divided into several subforms.
The left 50% (subform 1) of the screen is a continuous-form display of my master
table -- for ease of description, I'll pretend it's an orders database. Each record gets
one line on the form and consists of two buttons followed by descriptive data for that
record.
Depending on which button is pushed, I want to open subforms 2 and 3 (the top and
bottom 50% of the right half of the screen, respectively). Subform 2 would contain
another continuous-form of the line items for each order and would display only
those line items related to the selected record in the main table. Subform 3 would be
the edit window for the selected record in subform 2.
I have to have all three "frames" as subforms on the same main form because I want
each to be independently scrollable. I can't seem to get Access to recognize
subform 2 as a subform of subform 1 (thus limiting the entries displayed to those of
the selected record in 1). Rather, subform 2 lists all of the line items for every
order.
If there is no way to force it to recognize subform 2 as a subform of 1, I suppose the
solution is to pass the "Order #" from subform 1 to a query that would form the basis
of subform 2. (There is a one-to-many relationship between subforms 1 and 2.)
If anyone can help with that, I suppose that will make the answer to the other
question obvious, which is: how to get subform 3 to display the complete selected
record in subform 2 for editing/deletion.
To further complicate matters, depending on which button in subform 1 is pressed, I
have different sets of subforms 2 and 3 to open in those "frames." So what I'll need
to do for each button in subform 1, I assume, is: (1) set visible attribute of all the
possible subforms 2 and 3 to no; (2) set visible attribute to the 'correct' subform 2
and 3 to yes; (3) transfer focus to subform 2.
The screen would look something like this:
<maintable> | <subtable 1>
b1 b2 b3 R1 | b1 b2 b3 SR1
b1 b2 b3 R2 | b1 b2 b3 SR2
b1 b2 b3 R3 | b1 b2 b3 SR3
b1 b2 b3 R4 |------------------
b1 b2 b3 R5 |
b1 b2 b3 R6 | <edit window for
b1 b2 b3 R7 | selected SR in sub
b1 b2 b3 R8 | table 1>
b1 b2 b3 R9
etc.
(R) = main table record
(SR) = subtable (1:M) record
b = button
I hope this makes sense... anyone help?
Thanks!
figured out (especially thanks to some help from folks here), but I have been running
into a problem that I haven't been able to solve. It's taken me about a month to try
various options without success -- luckily it's only my self-imposed deadline I've
missed.
Here's the question. I have a main form that I have divided into several subforms.
The left 50% (subform 1) of the screen is a continuous-form display of my master
table -- for ease of description, I'll pretend it's an orders database. Each record gets
one line on the form and consists of two buttons followed by descriptive data for that
record.
Depending on which button is pushed, I want to open subforms 2 and 3 (the top and
bottom 50% of the right half of the screen, respectively). Subform 2 would contain
another continuous-form of the line items for each order and would display only
those line items related to the selected record in the main table. Subform 3 would be
the edit window for the selected record in subform 2.
I have to have all three "frames" as subforms on the same main form because I want
each to be independently scrollable. I can't seem to get Access to recognize
subform 2 as a subform of subform 1 (thus limiting the entries displayed to those of
the selected record in 1). Rather, subform 2 lists all of the line items for every
order.
If there is no way to force it to recognize subform 2 as a subform of 1, I suppose the
solution is to pass the "Order #" from subform 1 to a query that would form the basis
of subform 2. (There is a one-to-many relationship between subforms 1 and 2.)
If anyone can help with that, I suppose that will make the answer to the other
question obvious, which is: how to get subform 3 to display the complete selected
record in subform 2 for editing/deletion.
To further complicate matters, depending on which button in subform 1 is pressed, I
have different sets of subforms 2 and 3 to open in those "frames." So what I'll need
to do for each button in subform 1, I assume, is: (1) set visible attribute of all the
possible subforms 2 and 3 to no; (2) set visible attribute to the 'correct' subform 2
and 3 to yes; (3) transfer focus to subform 2.
The screen would look something like this:
<maintable> | <subtable 1>
b1 b2 b3 R1 | b1 b2 b3 SR1
b1 b2 b3 R2 | b1 b2 b3 SR2
b1 b2 b3 R3 | b1 b2 b3 SR3
b1 b2 b3 R4 |------------------
b1 b2 b3 R5 |
b1 b2 b3 R6 | <edit window for
b1 b2 b3 R7 | selected SR in sub
b1 b2 b3 R8 | table 1>
b1 b2 b3 R9
etc.
(R) = main table record
(SR) = subtable (1:M) record
b = button
I hope this makes sense... anyone help?
Thanks!