'Get database info and select appropriate month
Private Sub GetDataBase_Click()
Dim StartTime, PauseTime As Integer
Dim strSQL As String
Dim rs As Recordset
Dim db As Database
'On Error GoTo errMsg
If GetData = 0 Then 'call to GetData function in Module1
Exit Sub 'no database found
End If
'Wait, presumably to give db time to load before running query
PauseTime = 5
StartTime = Timer
While Timer < StartTime + PauseTime
Wend
'errHandler:
' mstrMonth = InputBox("Which month are you working on?", "Select Month")
'If Len(mstrMonth) <> 0 Then
' strSQL = "DELETE Main.Month FROM Main WHERE Main.Month <> '" & mstrMonth & "';"
'DoCmd.RunSQL (strSQL)
'Exit Sub
'Else
' MsgBox "Please enter a month!", vbCritical, "Missing Month"
'GoTo errHandler
'End If
'Exit Sub
'errMsg:
' MsgBox "Error in GetDatabase in OpCheck form"
'Choose which month to work on via parameter query
DoCmd.OpenQuery "MainQuery"
End Sub