AfterUpdate event and Form Filtering

  • Thread starter Thread starter Kirk P.
  • Start date Start date
K

Kirk P.

I've got this code in my AfterUpdate event of my combo box

Private Sub cboGlob_Disp_Name_AfterUpdate()

Dim strSQL As String
If IsNull(Me.cboGlob_Disp_Name) Then
' If the combo is Null, use the whole table as the RecordSource.
Me.RecordSource = "qselEQU_SEC_B"
Else
strSQL = "SELECT * FROM qselEQU_SEC_B " & _
"INNER JOIN qselEQU_SEC_A ON qselEQU_SEC_B.GLOBAL_COMPANY_DISPLAY_NAME =
qselEQU_SEC_A.[Global Company Display Name] " & _
"WHERE [Global Company Display Name] = " & Me.cboGlob_Disp_Name & ";"
Me.RecordSource = strSQL
End If
End Sub

The AfterUpdate event doesn't seem to be firing. When I click on one of the
selections, nothing happens - no error message or anything. Help?
 
I've got this code in my AfterUpdate event of my combo box

Private Sub cboGlob_Disp_Name_AfterUpdate()

Dim strSQL As String
If IsNull(Me.cboGlob_Disp_Name) Then
' If the combo is Null, use the whole table as the RecordSource.
Me.RecordSource = "qselEQU_SEC_B"
Else
strSQL = "SELECT * FROM qselEQU_SEC_B " & _ "INNER JOIN
qselEQU_SEC_A ON qselEQU_SEC_B.GLOBAL_COMPANY_DISPLAY_NAME =
qselEQU_SEC_A.[Global Company Display Name] " & _
"WHERE [Global Company Display Name] = " & Me.cboGlob_Disp_Name &
";" Me.RecordSource = strSQL
End If
End Sub

The AfterUpdate event doesn't seem to be firing. When I click on one of
the selections, nothing happens - no error message or anything. Help?

Do you have "[Event Procedure]" entered in the After Update property box?
 
Yes, I do have [Event Procedure] in the After Update box. I don't know if
this makes any difference, but the combo box I'm using to filter the data is
based on a select query, which is based on an Oracle pass-through query. Not
sure if that makes any difference....

Rick Brandt said:
I've got this code in my AfterUpdate event of my combo box

Private Sub cboGlob_Disp_Name_AfterUpdate()

Dim strSQL As String
If IsNull(Me.cboGlob_Disp_Name) Then
' If the combo is Null, use the whole table as the RecordSource.
Me.RecordSource = "qselEQU_SEC_B"
Else
strSQL = "SELECT * FROM qselEQU_SEC_B " & _ "INNER JOIN
qselEQU_SEC_A ON qselEQU_SEC_B.GLOBAL_COMPANY_DISPLAY_NAME =
qselEQU_SEC_A.[Global Company Display Name] " & _
"WHERE [Global Company Display Name] = " & Me.cboGlob_Disp_Name &
";" Me.RecordSource = strSQL
End If
End Sub

The AfterUpdate event doesn't seem to be firing. When I click on one of
the selections, nothing happens - no error message or anything. Help?

Do you have "[Event Procedure]" entered in the After Update property box?
 
Yes, it does have "[Event Procedure]" entered in the After Update property box.

Rick Brandt said:
I've got this code in my AfterUpdate event of my combo box

Private Sub cboGlob_Disp_Name_AfterUpdate()

Dim strSQL As String
If IsNull(Me.cboGlob_Disp_Name) Then
' If the combo is Null, use the whole table as the RecordSource.
Me.RecordSource = "qselEQU_SEC_B"
Else
strSQL = "SELECT * FROM qselEQU_SEC_B " & _ "INNER JOIN
qselEQU_SEC_A ON qselEQU_SEC_B.GLOBAL_COMPANY_DISPLAY_NAME =
qselEQU_SEC_A.[Global Company Display Name] " & _
"WHERE [Global Company Display Name] = " & Me.cboGlob_Disp_Name &
";" Me.RecordSource = strSQL
End If
End Sub

The AfterUpdate event doesn't seem to be firing. When I click on one of
the selections, nothing happens - no error message or anything. Help?

Do you have "[Event Procedure]" entered in the After Update property box?
 
Yes, I do have [Event Procedure] in the After Update box. I don't know
if this makes any difference, but the combo box I'm using to filter the
data is based on a select query, which is based on an Oracle
pass-through query. Not sure if that makes any difference....

An easy test to see if the code is firing is to temporarily add a line to
display a MsgBox...

MsgBox "test"
 
Back
Top