update one field based on other list box input

  • Thread starter Thread starter Fordy
  • Start date Start date
F

Fordy

I have been handed down an Access database with a fair amount of code in it
already.
In the main form I have one field that automatically shows the item price
based on the item picked from a list box. I need to duplicate that effect for
a description field as well. It needs to show automatically also.
I see the code that makes the price show up and tried to copy/paste and
change it to the appropriate description field. Didn't work needless to say
or I wouldn't be here. Can I post code here and get some help picking at it
by chance?

Thanks,
Andy
 
Here is the original code to update the price box. I need it to update the
new description box as well.
-----------------------------
Private Sub Combo11_AfterUpdate()

Dim strSql3 As String
Dim rst1 As DAO.Recordset

strSql3 = "Select Price From ItemTable where Item = '" & Me.Combo11.Value &
"'"
Set rst1 = CurrentDb.OpenRecordset(strSql3)
Me.Text19.Value = rst1("Price")
Me.Refresh

End Sub
 
Back
Top