Results 1 to 1 of 1

Thread: combobox help

  1. #1
    Join Date
    Mar 2004
    Posts
    1

    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.
    Code:
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •