combo box value problem

rashidzaib

Registered User.
Local time
Today, 11:34
Joined
Aug 12, 2007
Messages
32
hy
i hope all r fine
i am in trouble and i need some one help very badly
i have one table called department where
deptcode and deptname is present


and i have one item master table
where dept code and deptname is present.

here on item master form i have made combo box on dept code. now i want to enter the record automaticaly in dept name in item master table if i select dept code relavent dept name is auto selected in dept name field.

is there any way to solve this
as usual any reply should realy be appriciated
plsssssssssss i need this very urgently
bye
 
Hi

You are breaking the rules of normalisation by doing this.

You only need to store dept code in your item master table. Then whenever you want to reference deptname e.g. in a report, then you create a query to join the two tables together and use the query as the source of your report.

Read up on normalisation as it is key to database design.

Chris
 
hy
thank u very much for reply
the problem with me is this i have combo box on the dept code item i want to to see when i click on combo box a list appear with dept code i want to see deptname with this also so that user know that he slected this dept. by code only no one know which dept is this
i hope u will understand and give me positive response.
thank u
bye
 
Rashid,

I would have to agree with Chris on the normalization issue. You have duplicated two fields and put them in two tables. This might cause you some trouble later on. However, for what you want to do with your database right now, it should not affect anything (unless maybe you have relationships set up), although I would change it immediately.

Here is the Microsoft article for populating form controls based on other controls' rowsources (this is what you'll want to do with the combo box for DEPT NAME)....

http://support.microsoft.com/kb/319482/en-us

You also said something about entering records automatically. You can use the .GoToRecord command on form events to go to a new record.
 

Users who are viewing this thread

Back
Top Bottom