Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATING TABLE VALUES VIA A FORM 1

Status
Not open for further replies.

slapupp

Technical User
Aug 30, 2001
14
0
0
US
I have 2 tables as follows:

1. Production Table
2. Mold ID Table

I am trying to populate the following fields through a data entry form bound to the Production Table with information stored in the Mold information table

Part Number, Mold ID, Cycle Time

The mold information table stores the Part Number, Mold ID and Cycle time. There can be more that one record for each part number since a part can run on more than one mold.

Through the data entry form, I would like a drop down list to appear where the specific record containing the correct part number and mold id can be selected and the update the 3 fields (part, mold, and cycle) in the production database.

I am familiar with combo boxes but have had no experience in event driven procedures.

Could you please help me with this.

Thank You,

Mike Federighi



 
HI,
You can make the combobox which will have three columns
for example PartNumber,Mold,cycleTime (i.e whenever you
go to the combo box and have a look at the data you look at the three fields)Let us call this combo box "cboCombo"

Let us have three text boxes txtpart,txtMold,txtcycle.

Then in the After_Update Event of the "cboCombo" Type the following code

Private sub cboCombo_AfterUpdate()
me.txtpart.value = me.cboCombo.Column(0,me.cboCombo.value)
me.txtMold.value = me.cboCombo.Column(1,me.cboCombo.value)
me.txtcycle.value = me.cboCombo.Column(2,me.cboCombo.value)
End sub

If you need more details about combo columns please look in Access Help.

Hope this Helps,

Rann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top