Results 1 to 4 of 4
  1. #1
    JustLearning is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    26

    Creating a form from 2 tables

    Hey guys, new guy here, trying to get a handle on things. I'm not even sure if a form is the right way to do this, but here it goes.

    Basically, I have 2 tables: Orders and Changes. Orders is the base order, has a number, project numbers that are attached to it and a total amount of cost. Changes is the list of changes to an order, basically showing the progression of an order. For example, Order 101 is attached to projects A and B. It's total amount initially is $100. Along the way, Changes 1, 2 and 3 happen. Each of these changes is documented and stored in the Changes table. I then need a way to view the total amount of that Order including all the changes on one form. Would that be possible?

    And some random questions if possible:
    How do I add a timestamp to a table when clicking on Add New Record button for a form?
    Is there any way to make the new change numbers go immediately after the others? (ie. Order 101 has change requests 1 and 2. Order 102 comes afterwards, and has change request 1. I want to add change 3 to the table, but have it come after change request 2 of Order 101 on the table)


    And then I have some general questions about relationships and cross table population, but I'm still a little confused on how to word those right now.

    Thanks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Generally you would use a form based on orders and a subform based on changes.

    You can have a field in the table with a default value of Now(), which will add the current date/time.

    You don't really worry about the order of records in the table, you give them order when you view them. In your case, it sounds like the combination of order number and that timestamp field give you a perfect combination of fields to sort them.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    JustLearning is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    26
    Thanks for the quick reply!

    I'm trying to create a form and subform with the 2 tables, but I can't seem to get it to work. Does it have something to do with the relationships I set up? Whenever I create a form with data from more than 1 table, the form shows up blank.

    For the field in the table with a default value of Now(), what Data Type should I set the column as?

    Thanks!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Well, the main form would be based on a single table, and the subform would be based on a single table. They would be linked by the related field, presumably an order ID field.

    The data type would be Date/Time.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating Relationships between tables
    By jesterling in forum Access
    Replies: 2
    Last Post: 10-30-2012, 11:06 PM
  2. New to access, creating a form for 3 tables
    By thusgaard in forum Forms
    Replies: 3
    Last Post: 06-01-2011, 03:06 AM
  3. Creating a form while linking two tables
    By sai_rlaf in forum Forms
    Replies: 1
    Last Post: 04-29-2011, 02:08 PM
  4. Replies: 1
    Last Post: 07-27-2010, 08:02 AM
  5. Creating Form from Normalized Tables
    By heathers in forum Forms
    Replies: 2
    Last Post: 09-10-2009, 03:43 AM

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