gvirden
Dec 27th, 1999, 02:47 AM
I don't want employees to check checkbox 3 which will be recorded in the table as a sick pond (actually the fish are sick not the pond) without giving me a count of dead fish first. However, it is possible that the pond can be sick and have no dead fish. So my idea was to throw this message box up to remind employees(if they clicked the sick pond checkbox first, without prior providing a dead fish count) to click an option if they saw dead fish in the pond (this in turn would prompt an inputbox).
Private Sub Check3_Click()
If Check3 = 0 Then
Exit Sub
End If
MsgBox ("If there are any dead fish in " & lblpond & ", uncheck this box " & _
"and click yes above in-- Any dead fish floating?"), , "Warning! Report Dead Fish"
End Sub
Well they click OK to the msgbox, because they forgot to give me a count, and they must also unclick check3 for the next event to work. Of course the next event is to click yes to option25 (please don't make fun of that number) which means they see dead fish floating in the pond. When option25 is enabled (clicked), the floatingfish table opens and so on...
With rs
.AddNew
!pond = lblpond
!Date = Date
!By = strBy
Do Until Check3 = 1
deadfish = InputBox("Please estimate the number of dead fish.")
If IsNumeric(deadfish) And deadfish > 0 And deadfish < 100001 Then
Check3 = 1
Else: MsgBox ("Please enter a number between 1 and 100,000"), , "Try Again"
End If
Loop
!Number = deadfish
.Update
End With
This enters a complete record into my table floatingfish (that doesn't sound too morbid does it?). Anyway, this works great! The problem is that that message box comes back up again. Why does it do that. I'm telling VB to give me that msgbox on check3_click(). No where I am saying if check3 = 1 then msgbox(etc).
Private Sub Check3_Click()
If Check3 = 0 Then
Exit Sub
End If
MsgBox ("If there are any dead fish in " & lblpond & ", uncheck this box " & _
"and click yes above in-- Any dead fish floating?"), , "Warning! Report Dead Fish"
End Sub
Well they click OK to the msgbox, because they forgot to give me a count, and they must also unclick check3 for the next event to work. Of course the next event is to click yes to option25 (please don't make fun of that number) which means they see dead fish floating in the pond. When option25 is enabled (clicked), the floatingfish table opens and so on...
With rs
.AddNew
!pond = lblpond
!Date = Date
!By = strBy
Do Until Check3 = 1
deadfish = InputBox("Please estimate the number of dead fish.")
If IsNumeric(deadfish) And deadfish > 0 And deadfish < 100001 Then
Check3 = 1
Else: MsgBox ("Please enter a number between 1 and 100,000"), , "Try Again"
End If
Loop
!Number = deadfish
.Update
End With
This enters a complete record into my table floatingfish (that doesn't sound too morbid does it?). Anyway, this works great! The problem is that that message box comes back up again. Why does it do that. I'm telling VB to give me that msgbox on check3_click(). No where I am saying if check3 = 1 then msgbox(etc).