I want to write to a label when the process begins so that the user is aware of what is going on. I have this syntax, but the label is never updated?
What should I alter so that the label get's updated and the user is aware?
Code:
Private Sub btnRunStoredProc_Click()
Dim cmd As ADODB.Command
'Updating the label with a message to inform user process has not frozen up
Me.messagelabel.Visible = True
Me.messagelabel.Caption = "Querying database to get this information."
'Running stored proc
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = "Provider=ConnectionString"
.CommandTimeout = 0
.CommandType = adCmdStoredProc
.CommandText = "SQLServerStoredProc"
.Execute
End With
Set cmd = Nothing
'Repainting the form
Me.[Helper subform].Form.Requery
Me.[Helper subform].Visible = True
'Updating message to nothing
Me.messagelabel.Visible = False
Me.messagelabel.Caption = ""
End Sub