Unanswered: A97: Strangeness in flow
In an Access 97 database, I have the following code attached to the Change event of a combobox of a form. The code works fine except for the DoCmd.Hourglass commands. The DoCmd.Hourglass commands seem to both happen at the end after everything else runs and therefore you don't see the hourglass. If I comment out the DoCmd.Hourglass False command at the end of the Sub, then the hourglass will appear but only after everything else has run. As you can see from the code, the hourglass should show up before the rest of the code runs but it isn't. Any ideas?
Private Sub Combo0_Change()
Dim rec As Recordset
Dim strSQL As String
strSQL = "SELECT REPORTS_V_EMPLOYEE.[FILE#], REPORTS_V_EMPLOYEE.[SOCIALSECURITY#], " & _
"REPORTS_V_EMPLOYEE.HOMEDEPARTMENT FROM REPORTS_V_EMPLOYEE " & _
"WHERE (((REPORTS_V_EMPLOYEE.COMPANYCODE)=" & Chr(34) & [Forms]![fGarnishments]![Combo1] & Chr(34) & ") " & _
"AND ((REPORTS_V_EMPLOYEE.[FILE#])=" & Chr(34) & [Forms]![fGarnishments]![Combo0] & Chr(34) & "));"
Me.Combo20.RowSource = "SELECT REPORTS_V_LIENS.[LIENCASE#] " & _
"FROM REPORTS_V_LIENS INNER JOIN REPORTS_V_EMPLOYEE " & _
"ON (REPORTS_V_LIENS.[FILE#] = REPORTS_V_EMPLOYEE.[FILE#]) " & _
"AND (REPORTS_V_LIENS.COMPANYCODE = REPORTS_V_EMPLOYEE.COMPANYCODE) " & _
"WHERE (((REPORTS_V_LIENS.COMPANYCODE) " & _
" = " & Chr(34) & [Forms]![fGarnishments]![Combo1] & Chr(34) & ") AND ((REPORTS_V_LIENS.[FILE#]) " & _
" = " & Chr(34) & [Forms]![fGarnishments]![Combo0] & Chr(34) & "));"
Set rec = CurrentDb.OpenRecordset(strSQL)
Me.Text2 = rec![FILE#]
Me.Text4 = rec![SOCIALSECURITY#]
Me.Text6 = rec![HOMEDEPARTMENT]
Me.Text24 = ""
Me.Text26 = ""
Me.Text28 = ""
Me.Text30 = ""
Me.Text32 = ""
Me.Text34 = ""
Set rec = Nothing
"Doing stuff is overrated. Take Hitler for example. He did lots but don't we all wish he'd have just stayed home and gotten stoned?"