Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250

    When data entry form is opened to edit a record, subform cannot be edited (orders)

    Hello again,

    I am still struggling with the database I have been building, however, I made a big step today (from my point of view, anyway )...

    Nevertheless, I have run into an issue with editing records. I have this "Order Overview" read-only form with "Order Details" subform at the bottom:

    Click image for larger version. 

Name:	formorder1.PNG 
Views:	29 
Size:	46.0 KB 
ID:	27320

    I also created this data entry form for adding and editing orders:

    Click image for larger version. 

Name:	formorder2.PNG 
Views:	29 
Size:	32.4 KB 
ID:	27321

    I can edit the data within Orders Table just fine, but the subform is blank and I cannot edit it what so ever. It is connected to the Order Details Table. It DOES work when adding a new order though!

    Does anyone have any idea why that might be? Do you need additional information to determine the source of my problem?


    I kind of like Access, but you wouldn't believe how much pain it has caused me over the last few days .

    Thank you in advance,
    Tomas

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    You cannot edit subForm,until the parent record is saved.
    you cannot enter child records unless the subForm is bound to the parent via,
    Link child field,
    liink parent fields, are set.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Do you need additional information to determine the source of my problem?
    You could post your dB for analysis.......


    I kind of like Access, but you wouldn't believe how much pain it has caused me over the last few days
    Want to bet??? I enjoy using Access, but the headaches!

  4. #4
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    Ok, so what do you recommend me to do guys?

    I have a parent form and subform (both data entry), they are linked to tblOrders and tblOrderDetails, respectively.

    Tables have one-to-many link, referential integrity enforced.

    Thanks,
    Tomas

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Again, You could post your dB for analysis.......Just a few records, change any sensitive data........

  6. #6
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    Quote Originally Posted by ssanfu View Post
    Again, You could post your dB for analysis.......Just a few records, change any sensitive data........
    Ok, it is attached. One problem - the names are not in English so it might be difficult for you to understand several parts. If you don't understand something important, just tell me. Thank you for the analysis in advance!

    I could not upload it through the forum, so here is the link: http://www.filedropper.com/db_18

    Cheers,
    Tomas

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Figure out how to add it to your post - many of us cannot access certain sites due to site restrictions.

  8. #8
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    I simply cannot, I compressed the file in the zip file, it has 3,3 MB and there is an error after it's supposed to be uploaded. I tried it like 15 times. Try the link I have provided.

  9. #9
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Here is the dB. Just needed to do a "Compact & Repair" before zipping...
    Attached Files Attached Files

  10. #10
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    but the subform is blank and I cannot edit it what so ever
    For the form (sub form) "frmObjednavkyDetail", you cannot edit because of these properties:
    Allow Additions = No
    Allow Deletions = No
    Allow Edits= No


    Another problem is that the form "frmObjednavkyDetail" should have a record source that is a query:
    Code:
    SELECT tblObjednavkyDetail.PKDetailObjednavkyID, tblObjednavkyDetail.FKObjednavkaID, tblObjednavkyDetail.FKProduktID, tblObjednavkyDetail.SerialNumber, tblObjednavkyDetail.Cena, tblObjednavkyDetail.Poznamky
    FROM tblObjednavkyDetail;
    Note that it is one table.

    In the subform, the control for product ("FKProduktID") should be a combo box. (at least that is how I would have it).


    Also, the dB acts like there is corruption occurring/happening. Strange things are happening.....

  11. #11
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    Thanks for the input, however, this is not the form I have been talking about. It's "frmDEObjednavkySub", which has the correct properties and still cannot be edited. Any suggestions?

    The form you mentioned DOES have query as a record source (specifically qryTransakceALL).

    Yes, the combobox is planned for the future. I was thinking that the product name would fill itself based on the serial number but I am not sure I want that.

    What do you mean by corruption?

    Thank you very much!
    Tomas

  12. #12
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    this is not the form I have been talking about. It's "frmDEObjednavkySub"
    Oops, I was going by the pictures.......


    The form you mentioned DOES have query as a record source (specifically qryTransakceALL)
    Yes, but, to me, you have too many unnecessary tables added to the query.


    "frmDEObjednavkySub"
    OK, I'll take a look at that form.


    What do you mean by corruption?
    Strange things were going on when looking through the code/objects..
    See
    http://www.techrepublic.com/article/...ss-corruption/

  13. #13
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    Yes, but, to me, you have too many unnecessary tables added to the query.
    Well, there is something from every single one of them. What would you recommend me to do?

    OK, I'll take a look at that form.
    Thanks very much!

  14. #14
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    What would you recommend me to do?
    The subform "frmObjednavkyDetail" only needs the 5 fields from the table "tblObjednavkyDetail", yet you have 5 tables in the query!

    In the sub form, you need:
    FKObjednavkaID - linking field to the main form - in the record source, not on the form
    SerialNumber - in the detail section
    Cena - in the detail section
    Poznamky - in the detail section
    FKProduktID - in the detail section, this should be a combo box to be able to select the product.

    PKDetailObjednavkyID - in the detail section, hidden, no label. (Sometimes can't add new records if the PK field is not on the form)


    Those are the only fields needed in the sub form, so no other tables needed!


    I looked at the form "frmDEObjednavkySub". It is the almost the same as sub form "frmObjednavkyDetail" with the exception of the record sources.
    Why do you have two sub forms that are effectively the same?
    Last edited by ssanfu; 02-09-2017 at 06:21 PM.

  15. #15
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Can't run your file as I only have v2007, and can't follow all of the foreign names of forms/tables (too much pain medicine, perhaps) but when you see a post that says, basically:

    • I can Edit Records in FormB, when opened independently of FormA
    • On FormB... Allow Edits = Yes
    • When FormB is placed on FormA, as a Subform, I cannot Edit Records on it

    the problem is usually that Allow Edits = No on FormA, the Main Form, or something else is preventing the editing of FormA Records. This is because the Subform is a Control on FormA, and when you go Edit a Record on FormB, the Access Gnomes consider this to be 'editing' the Control on FormA! Confused now?

    Bottom line...if you cannot Edit Records on the Main Form (for whatever reason) ...you cannot Edit Records on the Subform!

    If you need to have the Controls on the Main Form as Read-Only but allow editing of Records on the Subform, the usual workaround is to set Allow Edits = Yes on the Main Form, then Lock all Controls on the Main Form except the SubForm Control.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. data entry/edit form
    By Jen0dorf in forum Access
    Replies: 5
    Last Post: 06-06-2016, 08:56 AM
  2. Replies: 12
    Last Post: 08-20-2014, 05:26 PM
  3. Replies: 9
    Last Post: 05-12-2012, 12:16 PM
  4. Replies: 7
    Last Post: 07-15-2011, 01:58 PM
  5. Edit record in form with original entry shown
    By erknoebe in forum Access
    Replies: 5
    Last Post: 09-29-2010, 02:33 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