Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15

    Form with Subform showing all records

    I have form [Order] that opens with event procedure

    Private Sub NewShipment_Click()
    DoCmd.OpenForm "Orders", acNormal
    DoCmd.GoToRecord , , acNewRec
    End Sub
    I want to add a sub form that show all records OrdersTbl. I have tried continous form, MS Access 2010 says you can't embed a continous form as a sub form.
    I have tried a query as the source of the subform and it shows all records until I embed it as a subform and then only shows one records.
    Can some teach this monkey a new sling on this thing
    Cosmo
    A monkey chasing his tail
    Last edited by Cosmo Monkey; 04-25-2013 at 11:56 PM. Reason: spelling correction

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, a continuous (as well as datasheet) form can BE a subform, can't put a subform ON a continous form.
    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
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15
    Quote Originally Posted by June7 View Post
    Yes, a continuous (as well as datasheet) form can BE a subform, can't put a subform ON a continous form.
    I apologize for my lack of understanding of the terminology of subform. It seems to be that a sub form is just a seperate form referencing the the same table? I need to place a form within a form that adds a new records that show all previous records added. Can this be done. I can do it with a split form but, can not edit the lower split form as when I place the form in edit the bottom portion of the split form is not there to edit?
    Cosmo
    still flinging
    Last edited by Cosmo Monkey; 04-25-2013 at 11:55 PM. Reason: spelling correction

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Customarily, a subform is a form on another form to facilitate data entry/edit for multiple related tables. If you are trying to replicate the effect of a split form, not something I would do. I don't understand the issue described in your last statement. A split form allows data entry/edit in either section.
    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.

  5. #5
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15
    I am creating a form to add a new order, and as per your definition, would like a subform showing in datasheet view showing all previous orders. I realize it not something you would like to do, but it seem it is something that others would like to do. And as for my last statement, MS Access is telling me that you can not add a continous form as a subform, and converts it to singleform.
    Cosmo
    so simple a monkey could do it....
    Last edited by Cosmo Monkey; 04-26-2013 at 01:24 AM. Reason: clarification

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I would like to see the source you are citing.

    Because I definitely have subforms set as continuous and datasheet.

    I've never bound a form and subform to the same dataset. I have seen it done.
    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.

  7. #7
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15

    Hmmm, wish you could tell me how who you saw did it, did it......

    Quote Originally Posted by June7 View Post
    I would like to see the source you are citing.

    Because I definitely have subforms set as continuous and datasheet.

    I've never bound a form and subform to the same dataset. I have seen it done.
    I am citing Access 2010. f I am in error or still can't read, it wouldn't be the first time.
    Attached Files Attached Files

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Cosmo Monkey View Post

    ...MS Access 2010 says you can't embed a continous form as a sub form...
    If you go back and check you will find that you have gotten the error message backwards! The actual message is

    "A Form with a Subform Object can’t have its Default View Property set to Continuous Forms."

    You cannot place a Subform on a Continuous Form; but a Continuous Form most certainly can be used as a Subform!

    Quote Originally Posted by Cosmo Monkey View Post

    ...I have tried a query as the source of the subform and it shows all records until I embed it as a subform and then only shows one records...
    The point of the Main Form/Subform scenario is to present a one-to-many relationship, between two Tables, with one Main Form Record having one or more related Records in the Subform. In addition to displaying a Main Form Record and its related Subform Records, the construct allows for the entering of data into two different Tables from a single Form, something that is generally impossible, when using a single Form based on a multi-table query.

    As you move from Record-to-Record, on the Main Form, the Subform Records are updated to show only the Records that are related to the current Main Form Record.

    BTW, there is a workaround that I can give you, if you're interested, for adding a Subform to a Continuous View Form.

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

    All posts/responses based on Access 2003/2007

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    As linq says, the error is regarding the parent form, not the subform. Reworded:

    A form cannot be set to continuous or datasheet if you want to place a subform on it.
    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.

  10. #10
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post

    ...A form cannot be set to continuous or datasheet if you want to place a subform on it.
    Actually, you can place a Subform on a Datasheet View Form. In the Main (Datasheet View) Form it displays as a Plus Sign

    [+]

    to the left (I believe) of the left-most Textbox in a given row. When Clicked the Related Record appears.

    You can even code for all of the Subforms to be dropped down when your MainForm opens. In the MainForm use this code
    Code:
    Private Sub Form_Load()
      Me.SubdatasheetExpanded = True
    End Sub
    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  11. #11
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15
    and that is what I had asked from the beginning....how do you set a subform in an add new record form that shows all records previously added? Look you are just too smart for me. I will look in other forums. This monkey can not understand your intelligence. Many people want to do this.

  12. #12
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15

    Sorry Linq

    You posted while I was writing. I will investigate your solution.

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Linq, don't think that is truly a 'subform', as in a subform container control with a SourceObject. There is no object or controls that can manipulated. I think can show only one relationship and I don't know how Access picks one over another if there is more than one involving same table. This is basically the same as showing expanded subdatasheets directly from table.

    Cosmo, never accuse me of being 'too smart', just another monkey that's been around Access for a while.

    Sorry I just don't understand what you want to do, maybe if I had pictures! The following might give you some ideas, I think it was what Linq alluded to http://www.fmsinc.com/microsoftacces...edsubforms.asp
    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.

  14. #14
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15
    You don't seem to comprehend what people are asking. Did you open up database1. Your answer had nothing to do with his question, just like here with mine.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Cosmo, where is database1? I think I know the thread you mean and I did open the db, hence the suggestions I offered. I edited my post there, take another look.

    That poster is using conventional form/subform arrangement for data entry to two tables.

    Look at my posting history. I seem to understand quite a few people but sometimes language barrier or knowledge levels just get in the way.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 07-16-2012, 07:19 PM
  2. Replies: 2
    Last Post: 05-02-2012, 09:16 PM
  3. Replies: 1
    Last Post: 03-02-2012, 10:24 AM
  4. Replies: 16
    Last Post: 02-13-2012, 03:32 PM
  5. Replies: 18
    Last Post: 01-27-2012, 12:53 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