Use One Form instead of Two

Keith

Registered User.
Local time
Today, 17:50
Joined
May 21, 2000
Messages
129
I have two buttons to open a form, one to add records the other to edit records. The 'Add New Record' button also writes some of the information to a second table. The 'Edit Record' button only updates a field in the second table if that field has changed. Both forms are identical but with different code behind them. I have been trying to achieve the same, using one form. I am having difficulty in running the code to add or update the record in the second table depending if the form is opened as Add New or Edit. I hope this makes sense. Could someone point me in the right direction, or should I stick to using two forms?
 
Tony, It is the db that I phoned you about when you were on holiday. I purchased a reservations Db that used a planner, which I do not need as it is only used for 4 days a year. The planner would not let you have two bookings for the same room at the same time. I am catering for two mates who want to share a twin room but be billed seperately
 
Still not clear why the 'second table'. Seems just need to change some table properties to allow duplicate values for room. Set a compound index to prevent duplicate room/client pair.
 
Still not clear why the 'second table'. Seems just need to change some table properties to allow duplicate values for room. Set a compound index to prevent duplicate room/client pair.

I defer to you and uncle gizmo and have decided to drop the second table.
 
Actually, should probably allow duplicate room/client pair for returning guests. Don't want duplicate room/client/date.
 

Users who are viewing this thread

Back
Top Bottom