Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Dega is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73

    Populating ID in multiple tables

    I am trying to get "BookingID" in table tblBookings populated in tblRooms and possibly more tables if I need it.



    The reason for this is that one customer may book several trips per year and this Access project worked well for a single booking, but gets very awkward to view and work with multiple bookings. (reports etc)

    I have tried changing the relationships previous to this screen shot, but have failed to get the BookingID over to tblRooms.

    I have attached two pdf files showing relationships and the interface I am developed so far.

    Thanks
    Last edited by Dega; 11-15-2011 at 09:29 PM. Reason: changes

  2. #2
    Join Date
    May 2010
    Posts
    339

  3. #3
    Dega is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    Thanks,

    I have seen this model and it's a hotel booking system which does not work for tour operators.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    You have a structure issue.
    Your set up relates Room Booking to CustId (tblRooms field CustId)
    The Room assignment etc should be related to BookingId and include DateFrom, DateTo, room details(smoking, beds,etc)

    As per Access Blaster there is a lot in those models that you could use. You don't need to adopt someone else's model lock/stock and barrel, you van take what you need to meet your requirements.

    There is another model, business facts and download option here
    http://www.databasedev.co.uk/hotel_r...ata_model.html

    Here are some references on Normalization.
    http://forums.aspfree.com/attachment...achmentid=4712 excellent overview
    http://www.rogersaccesslibrary.com/T...20Nutshell.doc list of steps for design

  5. #5
    Dega is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    Thanks for the reply.

    I had looked at this model before but I do not understand what the
    tblLINK_BookingsRooms and the tblLINK_RoomsFacilities do.

    tblLINK in general is what I don't get, and how or why to use a linked table.

    Most of this model will work as I will use at least 4 tables (tblCustomers,tblBookings,tblRooms,tblGuests).

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Quote Originally Posted by Dega View Post
    Thanks for the reply.

    I had looked at this model before but I do not understand what the
    tblLINK_BookingsRooms and the tblLINK_RoomsFacilities do.

    tblLINK in general is what I don't get, and how or why to use a linked table.

    Most of this model will work as I will use at least 4 tables (tblCustomers,tblBookings,tblRooms,tblGuests).
    The term LINK used by the author is NOT the same as a Linked Table in Access terms. His LINK tables are junction tables. These are tables that serve to remove many to many relationships into 1 to M relationships.

    see http://en.wikipedia.org/wiki/Junction_table or
    http://www.foresightsoftware.com/Acc...tionTables.htm
    for more info
    Last edited by orange; 11-15-2011 at 07:14 AM.

  7. #7
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73

    Hair pulling relationships

    I am having unproductive time attempting to create another improved database.

    Linked below is one db I did previously (demo.accdb) which worked fine for reports etc, but I need to be able to expand this database so the same customers can book in the same database several times a year. Data has been removed for privacy but feel free to ad your own.


    I had to use this db on a per trip basis which has its limitations as several different databases were needed during the year.

    Also attached are the requirements for the db but I am stuck on relationships and linking master/child fields.

    Would be grateful for any help and looking at other db models has not worked out ... yet.

    Thanks
    Last edited by Dega; 11-16-2011 at 10:24 PM.

  8. #8
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73

    basics

    Working with a Main form (tblCustomers) and two subforms (tblBookings) & (tblTours) throws errors as TourID will not appear in tblBookings.

    Thanks
    Last edited by Dega; 11-16-2011 at 10:23 PM.

  9. #9
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Can you attach an mdb copy if your database? I do not have Acc2007 or 2010 so can not open an accdb.

  10. #10
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    Orange

    I have uploaded a zipped file with the .mdb database.

    demo.zip

    You may have to look at the db objects under Unassigned Objects.

    frmCUSTOMERS is what your looking for ...
    Last edited by Dega; 11-16-2011 at 10:24 PM.

  11. #11
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    I looked at your database. I tried to use your frmCustomers to add some data... a Customer and a Booking, but I do not see how it's suppose to work.
    I'm not sure why you named a field TodaysDate... Is this the BookingDate? TodaysDate has a different meaning every time you view the Form.

    I am proposing a different set of relationships that will allow multiple Bookings per Customer. However, with out Business rules/facts and some meaningful test data, this revised structure may not be suitable to you.
    see Dega_rel.jpg attached.

    I don't know if you have a current operational database or not. If you design a new database to allow multiple bookings per customer, then you will have to move your current data to the new structure, which would be a separate task. To be of any more assistance, I would need some sample data, some business facts.

    In the proposed structure you wouldn't need CustId in the tblBookings since it can be derived from tblCustBookings. With an adjusted structure, some of your queries and forms will change.

  12. #12
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Seems I have double posted my response during an edit.

    It also seems that some of the fields in tblBookings related to Tour should be in tblTours (duraction, date..).
    Last edited by orange; 11-16-2011 at 09:12 AM. Reason: removed part of duplicated post

  13. #13
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    Today's date should have been the date the booking was taken ... but I was short on time then started getting busy.

    The operational database I have is the same as the copy you have seen, but only good for one destination (trip). It did the required reports (hotel rooming list) pick up points in cities, customs, etc but with limitations.

    I have customer data and moving it over (tblCustomers) to a new structure is not a issue as that table will not change, but I do plan to start from a new db that can book customers for multiple trips as many people do go often during the year,

    Have looked at the structure you provided and will look at this later on today, and can give you some data and business facts. Thank you for replying and taking the time to look at this and if there is anything you need otherwise ...

    I have until Dec 17 to get something working in the way of multiple bookings and I expect that I will be adding more functionality at a later time.

    Cheers

  14. #14
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Great, I'll wait for your facts/data. If you have suggestions/comments etc on the proposed structure as it is, please forward them also.

  15. #15
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    Orange

    Attached is a db used last year with data in it and a overview of what the database does and needs to do.

    Thanks

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 09-30-2011, 10:09 PM
  2. Replies: 1
    Last Post: 08-02-2011, 06:23 AM
  3. Access Form not populating from tables
    By Jim from Waconia in forum Forms
    Replies: 8
    Last Post: 04-01-2011, 03:35 PM
  4. PLEASE HELP - Two tables populating one form
    By intergnat1 in forum Forms
    Replies: 2
    Last Post: 03-17-2010, 07:20 AM
  5. Populating multiple fields
    By jjcaprio in forum Programming
    Replies: 11
    Last Post: 08-16-2009, 01:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums