I have two fields in a report "ProductCode" and "Description", the latteris
a combo box.
What I want to have happen is when the user goes to the Description Combo
box and selects an item, I want its corresponding "ProductCode" to appear
in the ProductCode box. Both of these items are picked from a Query which
lists the "Description" first followed by the "ProductCode".
Help from this list (PC Datasheet) was as follows:
I opened the form in design view and selected the textbox "ProductCode".
Clicked on the properties icon at the top of the screen to open properties.
Clicked on the 'Other' tab. Entered name property as "ProductCode" for the
name of the textbox.
Next selected the combobox and entered the combo box name "Desc" under the
"Name" property of the "Other" tab.
Went to the Data tab. Typed in 2 under the Bound Column property.
Went to the Format tab. Typed in 2 under the Column Count property.
Under Column Width property 1.5;2 was entered.
Went to the Events tab and clicked on the AfterUpdate event and entered the
following code:
Private Sub Combo131_AfterUpdate()
Me!ProductCode = Me!Desc.Column(1)
End
The problem is that on the form, the above works fine. But on the underlying
table the "ProductCode" is also entered in both the "ProductCode" and
"Description" fields.
Any help would be appreciated.
Thank you,
Bill.
--
William Bradley
Come visit us at:
http://www.catholicmissionleaflets.org
Free Rosaries available at the above.