I am sure this is easy but I can't seem to do it. I have a table, PartNumberTableCond, that has two column, PartNumber and PartDescription. I have a Form, Input, that I want to be able to put in a number from PartNumberTableCond, using a combo box, cboPartNumber, or just key in a new number. Then I want my PartDescription field to fill-in automatically if the number in cboPartNumbers is an existing part number. I think I need to put some code into the After Update Event but I cannot find code that will work. Here is what I have in there now and I think it is for a situation where I have two combo boxes and I think I need to change "RowSource" to something else:
Private Sub cboPartNumber_AfterUpdate()
Dim sPartDescriptionSource As String
sCPartDescriptionSource = "SELECT [PartNumberTableCond].[PartDescription]," & _
"FROM PartNumberTableCond " & _
"WHERE [PartNumber] = " & Me.cboPartNumber.Value
Me.PartDescription.RowSource = sPartDescriptionSource
Me.PartDescription.Requery
End Sub
Can anybody offer a simple solution for a simple person?!?!?
Thanks!!
BoydSue