Problem with combobox data

  • Thread starter Thread starter M Miller
  • Start date Start date
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
 
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
 
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
 
Back
Top