Hi ,
I have a main user form and based on input dates and combo box selections the below code will open up a query. My problem is if no one inputs a date the code should tekll ya to input a date...This only works when you first open the form..i suspect the code is not written that well and my skills are not that good to fix....any ideas...
Private Sub cmdReportableEdits_Click()
If ([txtstartdate_edits].Value = "") Then
MsgBox "You must enter a date."
Exit Sub
End If
If ([txtEndDate_edits].Value = "") Then
MsgBox "You must enter a date."
Exit Sub
End If
If IsNull([cmboBookName_Edits]) Then
MsgBox "You must select book."
Exit Sub
End If
If Me!cmboBookName_Edits.Value = "Multis" Then
Call GetMultisRE
End If
If Me!cmboBookName_Edits.Value = "Exotics" Then
Call GetExoticsRE
End If
If Me!cmboBookName_Edits.Value = "AI" Then
Call GetAIRE
End If
If Me!cmboBookName_Edits.Value = "PrePay" Then
Call GetPPRE
End If
If Me!cmboBookName_Edits.Value = "Flow" Then
Call GetFlowRE
End If
End Sub
I have a main user form and based on input dates and combo box selections the below code will open up a query. My problem is if no one inputs a date the code should tekll ya to input a date...This only works when you first open the form..i suspect the code is not written that well and my skills are not that good to fix....any ideas...
Private Sub cmdReportableEdits_Click()
If ([txtstartdate_edits].Value = "") Then
MsgBox "You must enter a date."
Exit Sub
End If
If ([txtEndDate_edits].Value = "") Then
MsgBox "You must enter a date."
Exit Sub
End If
If IsNull([cmboBookName_Edits]) Then
MsgBox "You must select book."
Exit Sub
End If
If Me!cmboBookName_Edits.Value = "Multis" Then
Call GetMultisRE
End If
If Me!cmboBookName_Edits.Value = "Exotics" Then
Call GetExoticsRE
End If
If Me!cmboBookName_Edits.Value = "AI" Then
Call GetAIRE
End If
If Me!cmboBookName_Edits.Value = "PrePay" Then
Call GetPPRE
End If
If Me!cmboBookName_Edits.Value = "Flow" Then
Call GetFlowRE
End If
End Sub