Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    160

    Unanswered: Linking Subforms

    Hi! I have Created a form with three subforms.

    Mainform: for this form I took 2 fields from the customer table(CustomerID as Primary key)

    Subform1: For this I took OrderID(Primary Key) field from Orders table.

    Subform2: For this I took Some fields from Order details table(DetailID as primary key).

    Subform3: For this I took all the fields from the Checklist table(with ChecklistID as Primary Key)

    CustomersTable

    CustomerID(PK)
    Lastname
    Firstname
    address

    Orderstable

    OrderID (PK)
    CustomerID
    Equipment
    Problem

    OrderDetails Table

    DetailID(PK)
    OrderID
    Techname
    Parts
    SNO


    ChecklistTable

    ChecklistID(PK)
    DetailID
    Modem
    virus
    ..
    ..
    Etc.


    All the tables are linked by One - Many relationship with referential integrity and Cascade update related fields and cascade delete related records checked. All the primary keys are Autonumber fields.

    For linking Subform1 to mainform Access automatically created link with CustomerID as linkchild field propertis and master field properties.

    While I am creating a link Between Subform1 and Subform2 I put OrderID, and In master field property I put [Subform1].Form![OrderID] in subform2 property sheet

    For linkingSubform2 and subform3 in the link In the link child fields I put DetailID and in the masterfield I put [Subform2].Form![DetailID]

    After entering all these, and while I am trying to open the form in form view It is asking for enter parameter value OrderID.

    I don't know what is the problem. Really I got Stuck here for the past 2 weeks.My boss is forcing me to complete the project.

    I am fairly new to access. If I wrote any mistakes pls forgive me.

    If u need some more information I can send U.

    Thanku.
    Vad

  2. #2
    Join Date
    Jan 2003
    Location
    Rockville, MD
    Posts
    179

    Re: Linking Subforms

    The master field has to be something on the main form. It can't be something from a subform on the main form.

    If you don't need to be able to add/edit/delete orders and details from this form (iow, if you only want to be able to select orders/details so you can view the checklist), you might be able to replace the first two subforms with list boxes or combo boxes. Then you could tie them as master/child to the remaining subform.

Posting Permissions

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