Thread: combobox help
03-22-04, 20:49 #1Registered User
- Join Date
- Mar 2004
Unanswered: Check if value has changed in afterupdate event of combobox
I have a database with two combo boxes. The first box,DivisionID, contains Divisions. The second box,StoreNumber, contains the store numbers of stores within the Division selected. When the value is changed in the Divisions box I have it successfully requerying the Stores combo box to show only stores within that division.
After the user selects a division and a store, if they then select a different division I want that store value to be blanked out.
The problem is...If the user pulls down the division box and selects the same division, the after update event still kicks in and blanks out the value in the store box. I want to check to see if the value has actually changed but I am unsure of how to do that.
Private Sub DivisionID_AfterUpdate() If Not IsNull(Me![StoreNumber]) Then Me![StoreNumber] = "" End If Me![StoreNumber].RowSource = "Select StoreNumber from Stores Where DivisionID = " + Me![DivisionID].Column(0) End Sub
Last edited by admlex; 03-23-04 at 23:28.