Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2004
    Posts
    64

    Unanswered: Master detail records

    Hi,
    I have a simple master detail form in which I have orders and order details.
    I enter an order in the master form and then add the various order details in the details form. I am linking the 2 forms with the OrderId - OrderId fields.
    When I enter the details I want each details line to increment by 1 ( not an auto number). ie
    Master -Order number = 10.
    Details - Order = 10 (line 1) 10 Apples
    Details - Order = 10 (line 2) 5 Bananas

    So in effect the real order numbers would now be 101, 102

    When I place my next order the master order number would be 11 but then the details would start with 1 , 2 etc so again, the order numbers would be 111, 112

    Does anyone know the easy way to achive what I want to do?
    Sorry if I havn't explained myself the best way.
    Thanks in advance
    Franki

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372

    Hello Franki!

    As i can understand you, you have got a MAIN FORM and
    a SUB FORM, linking via OrderID. You can make a REAL ORDER
    NUMBER only as a new field.
    OrderID in both forms must stay as it is, because of linking,
    (Link master fields, Link child fields).

  3. #3
    Join Date
    Nov 2004
    Posts
    64
    Yes thats right, I do have a detail form that has a field with the Master order number. I also have a field called LineNumber in my details form that I want to populate with the Master Order number + 1 . The LineNumber field is bound to a field in the Table Order Details called LineNumber.
    Any Ideas?

  4. #4
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    Look at "DemoLineNumberA2000.mdb",
    Open MainForm and try.
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2004
    Posts
    64
    [/B]Many thanks for your time and effort I think this is just what I was looking for.
    Franki

Posting Permissions

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