Results 1 to 3 of 3
  1. #1
    jfn15 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    26

    Question Updatable & editable subform?

    I am completely new to db/access. I am trying to build my 1st db in access2003. I have tables created, and linked as below. I need to create a main form that users can enter data about new permit holders, and within that form I also want to be able to assign data to each permit holder, from other tables (specifically tbl_animal, tbl_species, tbl_category) I need the user to be able to enter permit holder (or applicant) details and also list the various animals (and their relevant species and category). I imagine I'll need to use a combo box where users can select species by the scientific name, and then have 2 text boxes that populate with common name and category id. I also want to be able to enter how many of each species they own, and gender, animal identification etc. As this data comes from 3 other tables (tbl_animal, tbl_species & tbl_category), how do I create a subform that can be edited, updated and which also updates when a new application is added?
    Hope this makes sense - and I hope I have the tables set up correctly. Tables are linked as follows:
    tbl_main (app-id), other contact details columns etc.
    tbl_animal has animal_id as primary key, also species_id, and other relevant fields (quantity, gender, desexed, etc.)
    tbl_species has species_id as primary key, also category_id, and other relevant fields (scientific_name, common_name etc.)
    tbl_category has category_id and category_desc.



    I've tried creating a subform from a query bringing together the animal and species tables, that seems okay, but cannot be edited and does no update as I move through records in the main form. The basic combo box seemed fine when I created the subform, but doesn't seem to be linked correctly to the table? I have a combo box on it that allow me to select a scientific name and have 2 text boxes autofill with the common name and category id,but the data doesn't link to the main form correctly(?)


    Last edited by jfn15; 06-20-2011 at 07:50 PM. Reason: unclear question

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    I don't follow your post completely; but the topic generically is a nonupdateable query. I am presuming your subform is based on a query - - and if you run that query stand alone - you find that it is nonupdateable i.e. you can not change or add a record.

    This is a classic db issue. You can google the topic. it is when there is uncertainty or duplication of records as a result of the overall join of multiple tables..... or where there is an aggregation or a distinct method used.

    It can be frustrating, and a bit confusing at first. But it is not a bug nor defect. So build your query 1 table at a time - and test along the way until you see which join makes it non updateable. You will have to figure out an alternative - - possibly a sub table of a sub table - - although that becomes very cumbersome to manage.

    Hope it helps.

  3. #3
    kbrown is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Location
    Northern VA
    Posts
    2
    Concur generally with NTC. Getting subforms to behave within a form can be challenging, particularly when you have several queries in between the two - i.e., your subform is linked to a query, which itself is linked to other queries.

    Sometimes in trying to build the subform, it is best to build and test each step along the way - change one variable, test the subform. Change another variable, recreate and test the subform.

    I also have found it helpful to link the dependant fields in two related tables directly using a combo box (for example), then build the queries, then build the subform. The initial link tends to help keep things straight. Once you get more experienced, trying experimenting with the "relationships" interface, where you can view visually, the relationships between all of your tables. Again, do one step at a time, as the relationships can get tricky if you aren't familiar with the language used.

    Good luck.

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

Similar Threads

  1. Replies: 19
    Last Post: 10-20-2010, 01:27 AM
  2. Replies: 4
    Last Post: 04-09-2010, 02:16 AM
  3. The Recordset is not updatable
    By bullet_proof302 in forum Access
    Replies: 2
    Last Post: 11-07-2009, 12:13 PM
  4. Making subforms editable
    By ashiers in forum Forms
    Replies: 7
    Last Post: 10-08-2008, 04:09 PM
  5. making specific fields non-editable
    By narayanis in forum Forms
    Replies: 3
    Last Post: 08-06-2008, 12:22 PM

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