I have a cbo on a form that loads a large dataenvironment. It takes 20-40 seconds to load the data, during which time I want a label on the form to display "Loading Data...". I've tried the following code, but the label goes blank when the data is loading. What did I do wrong?
Code:
Dim Str1 as String
Dim Str2 as String
Private Sub Form_Load()
Str1 = "Ready"
Str2 = "Loading Data..."
End Sub
Private Sub Combo1_Click()
If Combo1 = 001
If Not Label1.Caption = Str2 Then
Label1.Caption = Str2
End If
DataEnvironment1.Command1.Open
If Not Label1.Caption = Str1 Then
Label1.Caption = Str1
End If
End If
End Sub