Hi all,
Basically I am trying to create some code that will check for nulls and then do different things depending on which result it gets.
So pseudo code:
What I have so far:
Any help would be greatly appreciated.
Basically I am trying to create some code that will check for nulls and then do different things depending on which result it gets.
So pseudo code:
PHP:
If cmb_name or cmb_outcome IsNull then
Show Message "At least one dropdown must be selected"
If cmb_name IsNotNull then
Check to see if that persons name is held in the DB.
Show Message if name does not exist
Else
Requery
End If
If cmb_outcome IsNotNull then
Check to see if only the outcome exists in the DB.
Show Message if outcome does not exist.
Else
Requery
End If
If cmb_name and cmb_outcome IsNotNull then
Check to see if that persons name is held in the DB.
and
Check to see if any outcome held against the person exists in the DB.
Show Message if no record exists.
Else
Requery
End If
End If
What I have so far:
PHP:
If IsNull(Me.cmb_name) And IsNull(Me.cmb_outcome) Then
Call MsgBox("At least one combobox must be selected before you can filter", vbExclamation, "Warning!")
ElseIf DCount("[cmb_name]", "tbl_log", "[Name]= '" & Replace(Me.cmb_name, "'", "''") & "'") = 0 Then
Cancel = True
Call MsgBox("Your name isn't held on this table!", vbExclamation, "Warning!")
Any help would be greatly appreciated.