I have a combo box that selects a customer and brings up all of the data associated with that customer (Billing data (on Main form), Order data (on Sub form #1) and Shipping Data on Sub form #2)...
The combo box is unbound and uses a select table/query.
Both subforms are 'bridged together' with the main form, so when you select a customer name all 3 forms populate...
Main form - based on Customer table
Sub form 1 - based on Order Detail table
Sub form 2 - based on Order table
It's the data from Sub form 1 and 2 that I don't want 'old' information to appear. I do need these forms 'bridged' so when I enter NEW info into sub 1 and sub 2, it will be stored in the appropriate tables.
Here's the code for the combo box:
Expand|Select|Wrap|Line Numbers
- SELECT DISTINCTROW Customers.CustomerID, [FirstName] & " " & [LastName] FROM Customers ORDER BY [FirstName] & "," & [LastName];
There's also an 'After Update' event associated with 'custname':
Expand|Select|Wrap|Line Numbers
- Private Sub custname_AfterUpdate()
- Me.FilterOn = True
- Me.Filter = "CustomerID = " & Me.custname
- Me.Requery
- End Sub()
Rosie