Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Posts
    178

    Unanswered: Copying text fields on different Forms

    Hi Guys,

    Im using access 2000, dont laugh. Im pretty new to it so i need some help with the syntax on copying text fields on different Forms.

    I have created several Tables.

    TblOrders
    TblCars
    TblMaterials

    When i View an order I want to open up a form that lists cars that i can link to the Order.

    So on this Cars Form i want the Foriegn Key which is the OrderID to be copied across into a field in the Cars form, in turn updating the Cars Table. Likewise with the Materials Table.

    Also as a side note do i need to maintain relationsships with these tables or can i delete them?

    Im sorry if i sound like a noob.

    Regards

    Aboo

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I don't understand the main problem, but I can assure you that you should NOT delete your relationships.

    Perhaps you just need to figure out combo boxes?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    May 2006
    Posts
    178
    Hi Trekker,

    The problem is that I want to view the Value ontaintained in the my "OrderID" text field in my "orderform" to appear in the "carform" when i push the command button to link a car to this Order. This way i can update the cars table with the "OrderID" as the foriegn Key.

    Any ideas?

    Aboo

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Ok, let's just take a step back.

    Cars and Orders. Each car can have how many orders? Each order can have how many cars?

    It sounds to me like you are trying to achieve what should not be done. To link a car to an order, wouldn't you just have a subform of cars that relate to an order?

    I'm finding this one really hard without seeing your ERD or knowing the goals of your database.

    Forgive me if I have missed something here, I am really drunk atm ^^
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    May 2006
    Posts
    178
    Hey Trekker,

    One Order can Have Many cars. Also One order can Have Many Materials aswell.

    The only way i can relate the cars and the materials to the Order is through "OrderID".

    When i am viewing an order on the orderform I have placed a commandbutton that will open up a carsform. When this happens i want to make sure that the relevant "OrderID" is shown in the correct field in the Car form so it stores the foreign Key "OrderID" in the Cars Table.

    I have heard of subforms, but what if i have several tables linked to the order?

    I hope it makes sense

    Aboo

  6. #6
    Join Date
    May 2006
    Posts
    178
    Any Ideas anyone?

  7. #7
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Post your ERD.

    I think you are making some mistakes at the defining relationships area.

    Sure... one order can have many materials, but that's only half of it. one material item can also appear on many orders.... right? So how have you dealt with that? Same goes for cars and orders.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •