After Update

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
 
J

Jeff Boyce

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.
 

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