BlueChicken
Usually Confused
- Local time
- Yesterday, 23:16
- Joined
- Jun 19, 2009
- Messages
- 88
Ok... I am making a database with four forms that record details about changes and new bookings different from our original schedule that we make for hotel bookings, rental car bookings, taxi/limo bookings, and airline ticket bookings.
Each form has 3 check boxes:
The 'Was this booking changed?' check box makes all the text boxes for changed information show.
The 'Was this booking canceled?' check box makes the reason check box show.
This all works perfectly... but only for one record, any more than that and the problem arises.
I can check the text boxes on the first record and have the text boxes appear on that single record but when I add a new record the text boxes are still visible when they should not be.
Here is my code (The only changes between each form are the names):
Each form has 3 check boxes:
- Is this booking new?
- Was this booking changed?
- Was this booking cancelled?
The 'Was this booking changed?' check box makes all the text boxes for changed information show.
The 'Was this booking canceled?' check box makes the reason check box show.
This all works perfectly... but only for one record, any more than that and the problem arises.
I can check the text boxes on the first record and have the text boxes appear on that single record but when I add a new record the text boxes are still visible when they should not be.
Here is my code (The only changes between each form are the names):
Code:
Option Compare Database
Private Sub CanceledHotel_Click()
Me.CancelHotelReason.Visible = Me.CanceledHotel
Me.BXCancel.Visible = Me.CanceledHotel
End Sub
Private Sub ChangedHotel_Click()
Me.ChangedHotelReason.Visible = Me.ChangedHotel
Me.NewHotelName.Visible = Me.ChangedHotel
Me.NewHotelCheckInDate.Visible = Me.ChangedHotel
Me.NewHotelCheckInTime.Visible = Me.ChangedHotel
Me.NewHotelCheckOutDate.Visible = Me.ChangedHotel
Me.NewHotelCheckOutTime.Visible = Me.ChangedHotel
Me.NewConfirmation.Visible = Me.ChangedHotel
Me.BXChanges.Visible = Me.ChangedHotel
End Sub
Private Sub RecordSearch_Click()
On Error GoTo Err_RecordSearch_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_RecordSearch_Click:
Exit Sub
Err_RecordSearch_Click:
MsgBox Err.Description
Resume Exit_RecordSearch_Click
End Sub