Using A2K3, Windows XP
I'm handling a many-to-many relationship with a linking table
structure as follows (irrelevant fields omitted):
tblIssue
PK_IssueID (autonumber, primary key)
IssueName (text)
tblArea
PK_AreaID (autonumber, primary key)
AreaName (text)
tblIssueArea
PK_IssueAreaID (autonumber, primary key)
FK_IssueID (foreign key linked to tblIssue.PK_IssueID)
FK_AreaID (foreign key linked to tblArea.PK_AreaID)
I'm trying to design a form for adding/editing Issues that will list
all AreaNames with a checkbox next to each, so that the user can mark
which AreaNames are associated with the issue he's adding/editing.
I've tried creating a subform, but with subform Master/Child links
being one-to-one relationships, I can't figure out how I'd be able to
have all AreaNames available.
I know I could do it the hard way without a subform, by dynamically
recreating the main form every time it's opened, looping through each
value in tblArea to create the checkboxes and labels, looping through
tblIssueArea to set the proper value of each checkbox, then running
Append/Delete queries on tblIssueArea for each time one of the
checkbox values changes. But I've gotta think there's an easier way!
Thanks in advance for any suggestions.. 3 2226
Robert McEuen wrote:
Using A2K3, Windows XP
I'm handling a many-to-many relationship with a linking table
structure as follows (irrelevant fields omitted):
tblIssue
PK_IssueID (autonumber, primary key)
IssueName (text)
tblArea
PK_AreaID (autonumber, primary key)
AreaName (text)
tblIssueArea
PK_IssueAreaID (autonumber, primary key)
FK_IssueID (foreign key linked to tblIssue.PK_IssueID)
FK_AreaID (foreign key linked to tblArea.PK_AreaID)
I'm trying to design a form for adding/editing Issues that will list
all AreaNames with a checkbox next to each, so that the user can mark
which AreaNames are associated with the issue he's adding/editing.
I've tried creating a subform, but with subform Master/Child links
being one-to-one relationships, I can't figure out how I'd be able to
have all AreaNames available.
I know I could do it the hard way without a subform, by dynamically
recreating the main form every time it's opened, looping through each
value in tblArea to create the checkboxes and labels, looping through
tblIssueArea to set the proper value of each checkbox, then running
Append/Delete queries on tblIssueArea for each time one of the
checkbox values changes. But I've gotta think there's an easier way!
Thanks in advance for any suggestions..
Your statement "I've tried creating a subform, but with subform
Master/Child links being one-to-one relationships..." doesn't compute.
Usually you have a single record associated with the Many...the Many
side displayed in a datasheet or continuous form.
Now you are correct that your can't use the typical property sheet
setting on a many-2-many/continuous-2-continuos form style. This is
where you can use the OnCurrent event of a form (or some other event)
and the use of the Filter/FilterOn keywords.
I'm assuming you have a main form, and 2 subforms containing the
continuous/datasheets.
For example, you might have
Private Sub Form_Current()
Forms!MainForm!OtherFormName.Form.Filter = _
"AreaID = " & Me.AriaID
Forms!MainForm!OtherFormName.Form.FilterOn = True
End Sub
Or you could create a text box called AreaID, visible false, in the main
form. And in the other subform's recordset have something like
Private Sub Form_Current()
Forms!Main!AreaID = Me.AreaID
"AreaID = " & Me.AriaID
Forms!MainForm!OtherFormName.Form.Requery
End Sub
Maybe this will point you to a method you can use.
On Jun 8, 2:03 pm, salad <o...@vinegar.comwrote:
Robert McEuen wrote:
Using A2K3, Windows XP
I'm handling a many-to-many relationship with a linking table
structure as follows (irrelevant fields omitted):
tblIssue
PK_IssueID (autonumber, primary key)
IssueName (text)
tblArea
PK_AreaID (autonumber, primary key)
AreaName (text)
tblIssueArea
PK_IssueAreaID (autonumber, primary key)
FK_IssueID (foreign key linked to tblIssue.PK_IssueID)
FK_AreaID (foreign key linked to tblArea.PK_AreaID)
I'm trying to design a form for adding/editing Issues that will list
all AreaNames with a checkbox next to each, so that the user can mark
which AreaNames are associated with the issue he's adding/editing.
I've tried creating a subform, but with subform Master/Child links
being one-to-one relationships, I can't figure out how I'd be able to
have all AreaNames available.
I know I could do it the hard way without a subform, by dynamically
recreating the main form every time it's opened, looping through each
value in tblArea to create the checkboxes and labels, looping through
tblIssueArea to set the proper value of each checkbox, then running
Append/Delete queries on tblIssueArea for each time one of the
checkbox values changes. But I've gotta think there's an easier way!
Thanks in advance for any suggestions..
Your statement "I've tried creating a subform, but with subform
Master/Child links being one-to-one relationships..." doesn't compute.
Usually you have a single record associated with the Many...the Many
side displayed in a datasheet or continuous form.
Now you are correct that your can't use the typical property sheet
setting on a many-2-many/continuous-2-continuos form style. This is
where you can use the OnCurrent event of a form (or some other event)
and the use of the Filter/FilterOn keywords.
I'm assuming you have a main form, and 2 subforms containing the
continuous/datasheets.
For example, you might have
Private Sub Form_Current()
Forms!MainForm!OtherFormName.Form.Filter = _
"AreaID = " & Me.AriaID
Forms!MainForm!OtherFormName.Form.FilterOn = True
End Sub
Or you could create a text box called AreaID, visible false, in the main
form. And in the other subform's recordset have something like
Private Sub Form_Current()
Forms!Main!AreaID = Me.AreaID
"AreaID = " & Me.AriaID
Forms!MainForm!OtherFormName.Form.Requery
End Sub
Maybe this will point you to a method you can use.
Thanks for your reply, Salad.
Sorry about the confusion with my Master/Child statement. What I was
getting at is that the link can't be the equivalent of an outer join.
So, in the case of my situation, if Issue 1 is associated with Areas
1, 2, and 5, a subform based on tblIssueArea would only show Areas 1,
2, and 5. What I'm trying to achieve is to have Areas 1, 2, 3, 4, and
5 visible with checkboxes next to each, with the checkboxes next to
Areas 1, 2, and 5 checked and those next to 3 and 4 unchecked.
The setup I initially envisioned was a main form based on tblIssue and
one subform (continuous, linked on PK_IssueID=FK_IssueID) based on
tblIssueArea, or based on a query joining tblIssueArea and tblArea.
Unfortunately, the filtering idea doesn't work for the same reason
subform isn't working - neither allows for Areas 3 and 4 (in this
example) to be available.
Does that make more sense?
Robert McEuen wrote:
On Jun 8, 2:03 pm, salad <o...@vinegar.comwrote:
>>Robert McEuen wrote:
>>>Using A2K3, Windows XP
>>>I'm handling a many-to-many relationship with a linking table structure as follows (irrelevant fields omitted):
>>>tblIssue PK_IssueID (autonumber, primary key) IssueName (text)
>>>tblArea PK_AreaID (autonumber, primary key) AreaName (text)
>>>tblIssueArea PK_IssueAreaID (autonumber, primary key) FK_IssueID (foreign key linked to tblIssue.PK_IssueID) FK_AreaID (foreign key linked to tblArea.PK_AreaID)
>>>I'm trying to design a form for adding/editing Issues that will list all AreaNames with a checkbox next to each, so that the user can mark which AreaNames are associated with the issue he's adding/editing. I've tried creating a subform, but with subform Master/Child links being one-to-one relationships, I can't figure out how I'd be able to have all AreaNames available.
>>>I know I could do it the hard way without a subform, by dynamically recreating the main form every time it's opened, looping through each value in tblArea to create the checkboxes and labels, looping through tblIssueArea to set the proper value of each checkbox, then running Append/Delete queries on tblIssueArea for each time one of the checkbox values changes. But I've gotta think there's an easier way!
>>>Thanks in advance for any suggestions..
Your statement "I've tried creating a subform, but with subform Master/Child links being one-to-one relationships..." doesn't compute.
Usually you have a single record associated with the Many...the Many side displayed in a datasheet or continuous form.
Now you are correct that your can't use the typical property sheet setting on a many-2-many/continuous-2-continuos form style. This is where you can use the OnCurrent event of a form (or some other event) and the use of the Filter/FilterOn keywords.
I'm assuming you have a main form, and 2 subforms containing the continuous/datasheets.
For example, you might have Private Sub Form_Current() Forms!MainForm!OtherFormName.Form.Filter = _ "AreaID = " & Me.AriaID Forms!MainForm!OtherFormName.Form.FilterOn = True End Sub
Or you could create a text box called AreaID, visible false, in the main form. And in the other subform's recordset have something like Private Sub Form_Current() Forms!Main!AreaID = Me.AreaID "AreaID = " & Me.AriaID Forms!MainForm!OtherFormName.Form.Requery End Sub
Maybe this will point you to a method you can use.
Thanks for your reply, Salad.
Sorry about the confusion with my Master/Child statement. What I was
getting at is that the link can't be the equivalent of an outer join.
So, in the case of my situation, if Issue 1 is associated with Areas
1, 2, and 5, a subform based on tblIssueArea would only show Areas 1,
2, and 5. What I'm trying to achieve is to have Areas 1, 2, 3, 4, and
5 visible with checkboxes next to each, with the checkboxes next to
Areas 1, 2, and 5 checked and those next to 3 and 4 unchecked.
The setup I initially envisioned was a main form based on tblIssue and
one subform (continuous, linked on PK_IssueID=FK_IssueID) based on
tblIssueArea, or based on a query joining tblIssueArea and tblArea.
Unfortunately, the filtering idea doesn't work for the same reason
subform isn't working - neither allows for Areas 3 and 4 (in this
example) to be available.
Does that make more sense?
Not really. I envision Main form. It has 2 subforms; subform for area
checking, subform of areas that were checked. I probably would have a
filter on the areas checked set to "" initially (or on Open). Then have
a command button to set the filter once area records are checked.
I do something similar and the filter statement should/will work. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mksql |
last post by:
As an example, I am building an authentication mechanisim that will use
data in the 3 left tables to determine rights to objects in a
destination table, diagrammed below. In this structure,...
|
by: j.mandala |
last post by:
This had got to be something obvious that I am too blind to see!
Funny problem: one of my users has my application linked to a SQL
Server Backend. Front end it Access XP (SP3). The first form...
|
by: Dave Boyd |
last post by:
Hi,
I have two very similar forms each with a subform. The main form gets
a few fields from the user and passes this back to a query that the
subform is bound to. The requery is done when the...
|
by: skgolden |
last post by:
My husband and I own a small temporary labor company and deal with 4
major clients (A,B,C & D), each of which has about 2 dozen units in
our tristate area that we deal with (ie, Company A, units...
|
by: NBruch |
last post by:
Ok let me explain what im trying to do:
i need a combo box which needs to be linked to a listbox (or combo box
doesnt matter which really) then the listbox should bring up the record
in a...
| |
by: filbennett |
last post by:
Hi Everyone,
I'm generally unfamiliar with Access form design, but have programmed
Cold Fusion applications for a couple of years.
I'd like to build a data entry form in Access that allows the...
|
by: eighthman11 |
last post by:
using Access 2003 and sql server version 8.0
Hey everyone. Created a text box where the user types in an Inventory
number and it takes them to that inventory number on the contimuous
form. The...
|
by: johnplayboy07 |
last post by:
hi, please i need support. i design a Registration form in frontpage 2003 and then design a table in SQL server 2000 database, now i want the data entries that will be filled on the form to be stored...
|
by: gnewsacct1 |
last post by:
I was going to design a simple movie database, but I'm just stuck in
the very begining.
It will contain the following information.
Country, Movie, Plot, Actors
So, I created tables...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |