Pause Code, Open Form, Continue Code

foxhound

Board Regular
Joined
Mar 21, 2003
Messages
182
Oh Board Masters :pray: Can anyone help me with the following?

Code:
Private Sub cmdRefresh_Click()

    With cmdRefresh
        .Transparent = True
    End With
    With cmdClose
        .Transparent = True
    End With
    With lbl_status
        .Visible = True
        lbl_status.Caption = "Updating Employee Info"
        Me.Repaint
    End With
'**************************************************************
'I would like a timer event to check the current time every
'three seconds and divide the "seconds" of the current time
'by 2. If the result is an integer, then I want the label named
'lbl_status to be visible else not visible (basically creating
'a blinking label)
'**************************************************************
        Call RefreshEmployeeData(mdteAsOfDate)
        DoCmd.SetWarnings False
    With lbl_status
        lbl_status.Caption = "Deleting Unneeded Info"
        Me.Repaint
    End With
        stDocName = "Delete UnNeeded Service Co Employees"
        DoCmd.OpenQuery stDocName, acNormal, acEdit
    With lbl_status
        lbl_status.Caption = "Finding Emps With No Photo"
        Me.Repaint
    End With
        Call UpdateEmployeesTableWithUnavailablePic
        On Error Resume Next
        strTblName = "EmpPhotos"
        DoCmd.DeleteObject acTable, strTblName
'*************************************************************
'I want the code to pause here then open "frmCreateTable"
'When the code in "frmCreateTable" has completed it will put a
'"Yes" value within a field in a table called "System Parameters"
'When that field is updated to "Yes" I wish for the previous
'code to continue.
'*************************************************************
        DoCmd.OpenForm "frmCreateTable"
        Do
        TestToContinue = DLookup("[ParameterValue]", "[System Parameters]", "[ParameterName]= OktoContinue")
        Loop Until TestToContinue = "Yes"
            stDocName1 = "EmpPhotos (All)"
            DoCmd.OpenQuery stDocName1, acNormal, acEdit
        DoCmd.SetWarnings True
    With lbl_status
        lbl_status.Visible = False
        Me.Repaint
    End With
        DoCmd.Close
        Screen.MousePointer = 0
    MsgBox "Employee data has been updated.", vbOKOnly
End Sub
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,221,798
Messages
6,162,027
Members
451,737
Latest member
MRASHLEY

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top