Hi,
Am new to vba and I need help the userform I just created to edit my table similar to a search. I already have a userform that populates this table. The table is shown below;
However, on the this new userform (frmEdit), I have a combobox with a drop down for Products and other textboxes for the other columns (PartID, Location, Date and Quantity).
But I dont know how to get the textboxes to populate with the PartID, Location, Date and Quantity that link the Product I select from the drop down and also to edit them assuming an error was enter to the data and then send back the correct information back to the table.
For example, if I select "Shoe" on the combobox (cboProd), I need the textboxes (txtPar, txtLoc, txtDat, and txtQty) to be populated with the values 12360, Store1, 25-Feb-10, and 100 respectively.
I also want to be able to edit and transfer those info to that same row.
I have shown the table below showing my data;
Product PartID Location Date Qty
Door 12345 Store4 23-Feb-10 15
Eject knob 12365 Store1 24-Feb-10 50
Shoe 12360 Store2 25-Feb-10 100
Screw caps 12380 Store3 26-Feb-10 50
(Sorry the table may not appear clearly, the top row is a row header)
Any Ideas? Please help.
Am new to vba and I need help the userform I just created to edit my table similar to a search. I already have a userform that populates this table. The table is shown below;
However, on the this new userform (frmEdit), I have a combobox with a drop down for Products and other textboxes for the other columns (PartID, Location, Date and Quantity).
But I dont know how to get the textboxes to populate with the PartID, Location, Date and Quantity that link the Product I select from the drop down and also to edit them assuming an error was enter to the data and then send back the correct information back to the table.
For example, if I select "Shoe" on the combobox (cboProd), I need the textboxes (txtPar, txtLoc, txtDat, and txtQty) to be populated with the values 12360, Store1, 25-Feb-10, and 100 respectively.
I also want to be able to edit and transfer those info to that same row.
I have shown the table below showing my data;
Product PartID Location Date Qty
Door 12345 Store4 23-Feb-10 15
Eject knob 12365 Store1 24-Feb-10 50
Shoe 12360 Store2 25-Feb-10 100
Screw caps 12380 Store3 26-Feb-10 50
(Sorry the table may not appear clearly, the top row is a row header)
Any Ideas? Please help.