Results 1 to 3 of 3
  1. #1
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393

    How to open form in add new mode and subform in edit/read only mode

    I have the following code on my command button

    DoCmd.OpenForm "frmSites", acNormal, , , acFormAdd

    and I want to be able to open a subform in this form to transfer data from another form so I am looking for some code that will allow me to open this subform in edit or read only mode

    DoCmd.OpenView "frmClientsSitesJunctionSub", acNormal, , , acFormReadOnly

    If I use open form again it opens 2 forms, I simply want a statement similar to this nested in same code, however this doesn't work

    Please help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Cannot address subforms for this. Subforms 'piggyback' the opening of main form.

    You can set the subform container control Locked property to Yes so that users can't get into the subform.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    damn I was hoping I could set this as this is way i figured out how to carry info from previous form combo to new form however this only works in edit mode and if in new mode I still can't work out how to transfer only one id and make everything else start new

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

Similar Threads

  1. Form doesn't open in Dialog mode
    By accessnewb in forum Programming
    Replies: 3
    Last Post: 08-02-2011, 08:38 AM
  2. Opening Saved data in form in Edit mode
    By l3111 in forum Forms
    Replies: 7
    Last Post: 06-06-2011, 11:37 AM
  3. Replies: 9
    Last Post: 04-04-2011, 11:13 AM
  4. Replies: 4
    Last Post: 01-14-2011, 10:37 AM
  5. Open Form in Add Mode
    By Boreal2009 in forum Programming
    Replies: 2
    Last Post: 10-23-2009, 10:53 AM

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