Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If blank Question

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Dear All,
I am using a form to select a date via a the calendar control and a report to run and then the user presses the button and the report runs for the date and reports selected, how can I get the coding to show a message if the following statements are true, "no date selected", and "no report selected" and also "date is greater than current date". I would then like the coding to retunr to the form. The coding I am using is below, I think I can get the coding to work for 1 if, but not the 3 that I require above.
'coding used
Private Sub dailyreportrun_Click()
Dim value As Integer
Sheets("personal").Select
[C1] = Dailyreports.value '= this is a combobox
Values = [a1]
[C2] = TBdaily.Text 'this is a text box, calendar value goes in here
Unload Me
value = MsgBox("Report Selected : " & Dailyreports.value & " for the " _
& TBdaily, vbYesNo)
If value = 6 Then
Unload Me
Else
Mainform.Show
End If
reportselect = Dailyreports
Select Case reportselect
Case "Extract Report": Call dailyextract
Case "Sql Report": Call sqldaily
Case "Refund Report": Call dailyrefund
Case "Email Agent Stats": Call getemaildata
Case "Update Client Daily": Call Clientdaily
Case "Update Broadband Report": Call Broadband_Data
Case "Email Data To Be Sent": Call dialler_call
Case "": Exit Sub
End Select
Exit Sub
Mainform.Show
End Sub

Thanks for any help on this.

Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top