wedd
09-21-2011, 05:03 AM
Hi All,
I'm trying to run a search through records where the user enters the year they want to make the booking; of the venue and a messagebox that pops up to display whether the venue, time, date is available or not available based on a search through the records...it's important that the times are not double booked unless cancelled. I've entered the following code but it only allows the user to enter a date; and returns back a message that the date is unavailable, but I would like to add the other criterias in the search. The code is below:
Is there a solution to do this procedure? If so, how can this be done?
Private Sub Command9_Click()
Dim SearchAndDisplayABooking
SearchAndDisplayABooking = InputBox("Enter the date to check if it's available")
MsgBox "This booking is available on " & DateDiff("yyyy", SearchAndDisplayABooking, _
Date) & "date."
Thanks for your contributions:friends:
End Sub
I'm trying to run a search through records where the user enters the year they want to make the booking; of the venue and a messagebox that pops up to display whether the venue, time, date is available or not available based on a search through the records...it's important that the times are not double booked unless cancelled. I've entered the following code but it only allows the user to enter a date; and returns back a message that the date is unavailable, but I would like to add the other criterias in the search. The code is below:
Is there a solution to do this procedure? If so, how can this be done?
Private Sub Command9_Click()
Dim SearchAndDisplayABooking
SearchAndDisplayABooking = InputBox("Enter the date to check if it's available")
MsgBox "This booking is available on " & DateDiff("yyyy", SearchAndDisplayABooking, _
Date) & "date."
Thanks for your contributions:friends:
End Sub