Combo box to fill data into form

G

Guest

hi,
here is a sub i use to fill in the description text box
once i enter the item number in the item text box. you can
just change my field names and table names to your's.

Private Sub txtItemID_BeforeUpdate(Cancel As Integer)
Dim txtItemID As Variant
If IsNull(Me!txtItemID) Then
Cancel = True
Else
Me!txtDescription = DLookup
("[ItemName]", "IMA", "[ItemID] ='" & Me!txtItemID & "'")
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top