jason_kelly
Board Regular
- Joined
- Jul 8, 2010
- Messages
- 50
Hi There,
I have the following code below, that will basically execute a function based on wether or not if there are specific fields on a form which are filled out.
The problem is this, when the fields (h3, h9 and h5) are all filed in, I have 2 message boxes that are appearing and popping up:
"V4_SEARCHBYASSIGNTO" and
"V4_SEARCHBYASSIGNTO_WTYPE"
The only message box that should be popping up is:
"V4_SEARCHBYASSIGNTO_WTYPE"
Any help with this is greatly appreciated.
Cheers,
Jay
I have the following code below, that will basically execute a function based on wether or not if there are specific fields on a form which are filled out.
The problem is this, when the fields (h3, h9 and h5) are all filed in, I have 2 message boxes that are appearing and popping up:
"V4_SEARCHBYASSIGNTO" and
"V4_SEARCHBYASSIGNTO_WTYPE"
The only message box that should be popping up is:
"V4_SEARCHBYASSIGNTO_WTYPE"
Any help with this is greatly appreciated.
Cheers,
Jay
Code:
[LEFT]Private Sub btn_search_Click()
'V4_SEARCHBYFILE
'V4_SEARCHBYSUB
'V4_SEARCHBYASSIGNTO
'V4_SEARCHBYASSIGNTO_WTYPE
If frmIMTS.h1.Value <> "" Then
MsgBox "V4_SEARCHBYFILE"
End If
If frmIMTS.h12.Value <> "" Then
MsgBox "V4_SEARCHBYSUB"
End If
If frmIMTS.h5.Value <> "" And frmIMTS.h9.Value <> "" Then
MsgBox "V4_SEARCHBYASSIGNTO"
End If
If frmIMTS.h3.Value <> "" And frmIMTS.h9.Value <> "" And frmIMTS.h5.Value <> "" Then
MsgBox "V4_SEARCHBYASSIGNTO_WTYPE"
End If
End Sub[/LEFT]