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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Block booking for reservations

Status
Not open for further replies.

aos

MIS
Feb 28, 2002
20
US
Hi!
i have code to book one date at a time but would like to be able to book upto 7 days at a time. any ideas? My current code is as follows:

Private Sub cmdReserve_Click()

Dim adoconnection As ADODB.Connection
Set adoconnection = New ADODB.Connection

adoconnection.Open ("Provider=Microsoft.jet.oledb.4.0;" & "Data Source = c:\Project\DB.mdb")

Set rs = New ADODB.Recordset
rs.Open "select * from BookedRooms", adoconnection, adOpenDynamic, adLockOptimistic

rs.AddNew

rs!Name = UCase(txtNameofGuest)
'rs!RoomNo = UCase(txtRm)
rs!RoomNo = UCase(cboRm.Text)
rs!Date = UCase(DTPicker5)

rs.Update
rs.Close
Set rs = Nothing
txtNameofGuest.Text = ""
'txtRm.Text = ""
cboRm.Text = ""

MsgBox "Information Saved Successfully", vbInformation, "Information"


End Sub
 
You can provide a facility wherein the user is provided with a form that asks the user with the number of days he/she wants to book for.

Say something like this.

1. After entering the Number of days
2. Provide a List box (Hidden/Visible - your choice)
3. Provide a Command Button (Add Date) and place it next to the Date Picker
4. For each date selected, the user will have to select the date and click on the Add button which add the date to the List box

This would however requires a change to your database design in the sense that it now has to store as many dates as possible (say a new table with Customer Id & Date Columns)

If you got the point good, in case you did not you are free to contact me at theguydesparado@yahoo.com
Engi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top