Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Read only main/sub form (2000)

    In the enclosed database, the form called Frm_Review is designed to compare two tables, Items and TblImport, via a main and a sub form. The main form displays the records in the Items table, the sub form displays the records in the TblImport table.

    My form is designed to return only records where the suppProdCode field in the two tables match, as determined by the QryImportcheck query. I can then review the data on each form, and change whatever I need to change, including the SuppProdCode if so required.

    All well and good, the form does display only those items from the two tables where the SuppProdCode is the same. However for some reason, whereas the sub form enables me to change records, the main form does not. Why is this happening and how can I change this, as I want to be able to change data in the main form as well?

    Any help is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Read only main/sub form (2000)

    The Main form gets its data from qryImportCheck. If you open that query directly you can't change data in the query itself. The problem is that this query joins two tables on fields that are do not have a unique index.

    If you set the Indexed property of SuppProdCode in both tables Items and tblImport to Yes (No Duplicates) then you can edit data in the query, and so also in the Main form.
    Regards
    John



  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Read only main/sub form (2000)

    Thank you John, you have solved my problem and saved what little hair I have left!
    Much appreciated.

Posting Permissions

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