PC Review


Reply
Thread Tools Rate Thread

Adding Data from the many side of a relationship

 
 
=?Utf-8?B?TGVsZQ==?=
Guest
Posts: n/a
 
      6th Sep 2006
My table called Patterns is connected to my table PatternColor in a one
to many relationship. Both tables have an autonumber as their primary keys.
The PatternColor Table has 3 fields: PatternColorID (autonumber) PatternID
(The many side of the PatternID autonumber field in the Pattern Table, and a
text field called color. The Pattern Table has 2 fields: PatternID
(autonumber) and Pattern (text)

Each of the line items on my order entry form requires selection of a
PatternColor.

It seems to me the best way for my order entry line items to work is with 2
combo
boxes: the first allows the user to select the pattern and the second is
filtered by the choice the user makes in the first combo box.
I have written a query with the following parameter to filter the
PatternColorCbx:

[forms]![orderentry]![orderLineItems]![PatternCbx]. It works ok to a point.
Here's the problem.

When I am in the data entry form, and I select my pattern from the 1st drop
down box, the second box correctly presents the filtered choices; however,
when I try to make a selection from the PatternColorCbx, I am "bleeped" and
told there is no matching PatternColor in the PatternColorTable. (there is!)

When I open the query that underlies my data entry line subform, I have the
same problem if I enter the pattern name first and then try to enter the
patternColor. However, if I change the the data entry sequence and
enter the PatternColorID first, everything is fine and the form makes the
appropriate matches, looks up and completes the pattern side of the
relationship.

I really would like the user interface should work the way I am suggesting.
My list of patterns is already large and when you add the patternFabricColor
choices it will get tough to find the appropriate entry.

I have thought about combining the PatternCbx & PatternColorCbx into a
single Cbx given that a pattern name could have 10 or more characters, the
user would have to do a lot of typing before they were presented with the
appropriate Pattern/PatternColor combination.

I am also reluctant to combine the Pattern and PatternColor Fields because
of the problems presented when a Pattern or a PatternColor is not on the
list. I need to be able to add a new PatternColor if the pattern is there
but not the PatternColor, and if the pattern has not yet been entered I want
to open a form, in response to the not on list event. This form is created
and set up
(patterns) with a subform (PatternColor) in a one to many relationship
and works fine.

I hope I have explained the problem clearly enough. Thanks to anyone who
can offer some help or ideas.


--
Lele
 
Reply With Quote
 
 
 
 
=?Utf-8?B?amFtZXNkZWNrZXJ0?=
Guest
Posts: n/a
 
      6th Sep 2006
Lele,
You can place a breakpoint to catch the combo box event and see what value
you are entering when you select a choice from the combo box.

James

"Lele" wrote:

> My table called Patterns is connected to my table PatternColor in a one
> to many relationship. Both tables have an autonumber as their primary keys.
> The PatternColor Table has 3 fields: PatternColorID (autonumber) PatternID
> (The many side of the PatternID autonumber field in the Pattern Table, and a
> text field called color. The Pattern Table has 2 fields: PatternID
> (autonumber) and Pattern (text)
>
> Each of the line items on my order entry form requires selection of a
> PatternColor.
>
> It seems to me the best way for my order entry line items to work is with 2
> combo
> boxes: the first allows the user to select the pattern and the second is
> filtered by the choice the user makes in the first combo box.
> I have written a query with the following parameter to filter the
> PatternColorCbx:
>
> [forms]![orderentry]![orderLineItems]![PatternCbx]. It works ok to a point.
> Here's the problem.
>
> When I am in the data entry form, and I select my pattern from the 1st drop
> down box, the second box correctly presents the filtered choices; however,
> when I try to make a selection from the PatternColorCbx, I am "bleeped" and
> told there is no matching PatternColor in the PatternColorTable. (there is!)
>
> When I open the query that underlies my data entry line subform, I have the
> same problem if I enter the pattern name first and then try to enter the
> patternColor. However, if I change the the data entry sequence and
> enter the PatternColorID first, everything is fine and the form makes the
> appropriate matches, looks up and completes the pattern side of the
> relationship.
>
> I really would like the user interface should work the way I am suggesting.
> My list of patterns is already large and when you add the patternFabricColor
> choices it will get tough to find the appropriate entry.
>
> I have thought about combining the PatternCbx & PatternColorCbx into a
> single Cbx given that a pattern name could have 10 or more characters, the
> user would have to do a lot of typing before they were presented with the
> appropriate Pattern/PatternColor combination.
>
> I am also reluctant to combine the Pattern and PatternColor Fields because
> of the problems presented when a Pattern or a PatternColor is not on the
> list. I need to be able to add a new PatternColor if the pattern is there
> but not the PatternColor, and if the pattern has not yet been entered I want
> to open a form, in response to the not on list event. This form is created
> and set up
> (patterns) with a subform (PatternColor) in a one to many relationship
> and works fine.
>
> I hope I have explained the problem clearly enough. Thanks to anyone who
> can offer some help or ideas.
>
>
> --
> Lele

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding data to tables with many-to-many relationship MikeB Microsoft Access 4 22nd Feb 2008 06:09 PM
Adding Server Side code in a Client Side Script??? =?Utf-8?B?TWlrZSBSYW5k?= Microsoft ASP .NET 1 30th Jan 2006 08:52 PM
Collectiong Data on Server side while adding rows on client side =?Utf-8?B?U2lsZWVzaA==?= Microsoft ASP .NET 0 3rd Nov 2004 12:43 AM
Problem in adding template of server side control using client side scripts Lau Lei Cheong Microsoft ASP .NET 1 13th Oct 2004 11:41 AM
Adding Records to Many side of relationship... Scott A Microsoft Access Form Coding 4 15th Mar 2004 01:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 AM.