update 2nd combo box and subform with 1st combo box

hasanrazaj1

Registered User.
Local time
Tomorrow, 00:37
Joined
Jun 3, 2009
Messages
20
HI all.

i am facing a difficult situation. :confused: i have 3 tables thats are:

1.AccountType (AcTypeID, AcTypeName,)
2.Account(AcID, AcTypeID, AcName, AcDetail, AcDate)
3.Payments(AcID, PayID, PayType, PayMode, Amount, PayDate)

i want to have a bound form with Accounts Table which include:

1st.(combo box)AcTypeID From AccountType Table
2nd.(combo box)AcID From Accounts Table
3rd.(text box)AcName From Accounts Table
4th.(text box)AcName Form Accounts Table
5th.(subform)Payments

then my requirements are that;

when i select a AcType from 1st combo box then 2nd combo box populated with related accounts list, and
when i chose an account from 2nd combo box then the 3rd, and 4th text box filled up with related record and as well as 5th Subform of payments also present related payments transctions.

i will thankful to you for help.
 
Search this forum for Cascading Combo Box or follow the link. This should answer the first part of your Question.

The second part can be achieved by populating the text boxes using the combo as the text box's Control Source, for example put;
Code:
=Me.ComboName.Column([B]X[/B])
Were Column(X) represent the data in the combo you wish to display in the text box. Remember that combo boxes are zero indexed. This means that the first column (usually hidden) is column number zero, the second is Column number one and so on. The data you wish to display in the text box must be part of the Row Source of the combo, but not necessarily visible.
 
Button of another unbound form will update 1st bound form and its subform data

Hi.

Thank You for your help. as i try it seemed to me that it is useless to update a combo box who's control source is attached with an autonumber field.:(

But i design another database.

which include three tables.
Category
Prudocts
and Order Details
i Create a Form: Products and placed a button find products
which open another unbound form"Find Product"
here two combo box and one button. after selecting category and product from list, i want that when we click on button then it will update the products form.
can it is possible.
thank you for your help in anticipation;)
 

Attachments

Users who are viewing this thread

Back
Top Bottom