After Update

  • Thread starter Thread starter briank
  • Start date Start date
B

briank

I have a form whose control source is tblVendors. When
the user enters a name in the first tab I would like four
other tabs to populate (providing that there is matching
data in the Vendor table). I am using the Dlookup command
below but this is not working. Any thoughts?

Private Sub PaidToAdd_I_AfterUpdate()
Dim PaidToAdd_I As Variant
Me!PaidToAdd_I = DLookup
("[VendorAdd_I]", "tblVendors", "tblVendors!Vendor = " & _
Forms![tblExpenses subform]![PaidTo])
Me.Refresh
End Sub
 
One approach would be to select the Vendor in a control (an unbound combo
box in the header rather than the tab control). In the AfterUpdate event of
this control, requery the form's source, based on the control's value.

In the combo box's NotInList event, provide a mechanism for adding a new
(unfound) Vendor -- Access HELP has code to do this.
 
Back
Top