Default items to be added (1 Viewer)

L4serK!LL

Registered User.
Local time
Today, 22:01
Joined
Jul 22, 2002
Messages
59
I got 2 tables here: the first one is holding a list of articles, the second one holds orders consisting of some of those articles...

Each article has a flag claiming it is a Common article or not; now when a user starts a new order, I would like to have all the Common articles automatically added to the shopping basket, which means for each Common article a new record in the orders table...

How should I do this?
 

Haitham

Registered User.
Local time
Tomorrow, 00:01
Joined
Oct 27, 2002
Messages
17
As long as u did not clear ur request well, i guess as i under stand to have a combo box for the user to select the article which he/she need at that time other fields will be filled Automatecly.

For Example:

Private Sub ArticleComboBox_AfterUpdate()

Me![Ur Field Name From The Table] = Me!Ur Field Where To Show.Column(1)
Me![Ur Field Name From The Table] = Me!Ur Field Where To Show.Column(2)
...
....
.....
End Sub

Hope That Helps U
Saam001@yahoo.com
 

L4serK!LL

Registered User.
Local time
Today, 22:01
Joined
Jul 22, 2002
Messages
59
Hmm, I should explain better :)

What I have is 2 tables as stated above + a form.
The form has 3 parts:

part 1 -> order settings (auto-id, name, address, ...), the main form

part 2 -> a list of possible articles to select from (amongst which some Common articles), implemented as a subform showing all records from table ARTICLES

part 3 -> list of selected articles, implemented as a subform showing all records from table ORDERS where ORDER = ORDER_ID on main form


Now what I want is that articles that are stored as 'Common' (from part 2 list) are to be added to the part 3 list instantly when creating the new order...

It would also be neat if I could make it that way so that when someone adds an article to the order list, the article is removed from part 2 (same with the common articles that are added automatically (i hope :) ) )...

So in fact i'm looking for a way to move records between tables by selecting them in one of the subforms...
 

Haitham

Registered User.
Local time
Tomorrow, 00:01
Joined
Oct 27, 2002
Messages
17
Dear L4serK!LL,

It's realy better to send me ur db by zip file and i'll do it for u,,,
because i have no controld + form and subforms name.

Sorry,
Ready To Help At Any Time....

Saam
 

L4serK!LL

Registered User.
Local time
Today, 22:01
Joined
Jul 22, 2002
Messages
59
Haitham said:
Dear L4serK!LL,

It's realy better to send me ur db by zip file and i'll do it for u,,,
because i have no controld + form and subforms name.

Sorry,
Ready To Help At Any Time....

Saam
Sending the Database would be useless since you wouldn't understand the naming and all, but I'll try to give you a translated online version ;)

Table Options has field ID (unique) and some text fields (not important)...
Table Types has field ID (unique) and again property field that don't matter here...
Table Links holds pairs (Type_ID,Option_ID) (multiple Option_IDs for each Type_ID) (the pair is, combined, the primary key) which indicates the possible options for that Type...
I have a table Orders which has a unique key ID again and has (next to some other fields) a field Type_ID specifying the ordered record from Types. Finally also a last table Order_Details which stores pairs (Order_ID,Option_ID) specifying the ordered options...

Now i got a form Ordering linked to the Orders table. When one creates a new record, the moment the person fills in the Type_ID field (dropdown box) and that way chooses the type, I'd like to have all (Form_Order_ID, Option_ID) pairs added to the Order_Details table, keeping in mind that the Dropdown_Type_ID specified in the dropdown box has a matching record in table Links: (Dropdown_Type_ID, Option_ID)... So in fact when a new order is created I'd like to see all Options added as ordered by default...

BTW: sorry for taking me that long to reply :( Have had other things on my mind lately...

Thanks in advance for the help ;)
 
Last edited:

Users who are viewing this thread

Top Bottom