Problem with combobox data

M

M Miller

Hello,

I have a database for our non-conforming materials. There is a NCR Master
Table where I use a form called NCR Generation to allow data entry. I use a
combo box which displays item number, description, revision, and unit cost
which is drawn from our item information in a separate file. It works fine on
the form in displaying description, revision, and unit cost on my form.

I would however like to break a cardinal rule about databases by storing the
revision and unit cost in my NCR Master Table since these may change over
time and I want to have the information that was correct at the time of the
non-conformance. I cannot columns 2 and 3 to write to my NCR Master Table.

I am fairly new to this so your help would be great.

Thank you.

Mike
 
D

Dale Fye

Mike,

I assume you have the Revision and UnitCost fields in the bound forms
recordset (which I guess is based on your NCR Master table). If so, then in
the combo boxes AfterUpdate event, use the combo boxes Column property to
fill in those data fields. It might look something like:

Private Sub cbo_NonConform_AfterUpdate

me.[Revision] = me.cbo_Nonconform.column(x)
me.[UnitCost] = me.cbo_Nonconform.column(y)

End Sub

where X and Y represent which column of the combo boxes recordset is the
Revision or UnitCost values are in. These are zero based, so if they appear
to be in columns 3 and 4, you would use x = 2 and y = 3.

HTH
Dale
 
M

M Miller

Thanks Dale. It worked great. I appreciate the help.

Mike
--
M Miller


Dale Fye said:
Mike,

I assume you have the Revision and UnitCost fields in the bound forms
recordset (which I guess is based on your NCR Master table). If so, then in
the combo boxes AfterUpdate event, use the combo boxes Column property to
fill in those data fields. It might look something like:

Private Sub cbo_NonConform_AfterUpdate

me.[Revision] = me.cbo_Nonconform.column(x)
me.[UnitCost] = me.cbo_Nonconform.column(y)

End Sub

where X and Y represent which column of the combo boxes recordset is the
Revision or UnitCost values are in. These are zero based, so if they appear
to be in columns 3 and 4, you would use x = 2 and y = 3.

HTH
Dale
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



M Miller said:
Hello,

I have a database for our non-conforming materials. There is a NCR Master
Table where I use a form called NCR Generation to allow data entry. I use a
combo box which displays item number, description, revision, and unit cost
which is drawn from our item information in a separate file. It works fine on
the form in displaying description, revision, and unit cost on my form.

I would however like to break a cardinal rule about databases by storing the
revision and unit cost in my NCR Master Table since these may change over
time and I want to have the information that was correct at the time of the
non-conformance. I cannot columns 2 and 3 to write to my NCR Master Table.

I am fairly new to this so your help would be great.

Thank you.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top