Show a form inside a datasheet, yes it's possible!

please, share us your code..
 
You can insert any form you want. It can also be a continuous form, another table or Query. It's not necessary that the table or query is linked to the main datasheet table/query.

Make a datasheet form (i used the wizard for this test)
You select the controls in design view, right click select layout > tabular. Right click on the first control, right click > Insert Below > Click on the empty cell > Properties > SourceObject and select any form, table, query you want.

Have fun with it.

You can do this also by code, but I just made this discovery a few minutes ago. May be you can post some usefull usage of this trick.
 

Attachments

  • Datasheet.PNG
    Datasheet.PNG
    47.9 KB · Views: 65
i can't make it work, i am using A2021?
 
@MsAccessNL
I do not get it. People seem to hate the concept of the sub datasheet because they say it is confusing. Same people using table lookups, multi value fields, and other really confusing things. I use a lot of Treeviews so to me it is a simple way to build a treeview. So on a related note if you do some simple formatting it comes out pretty useable. Suprising the concept has not caught on.

sub.png
 
I might be wrong, but all you have to do is go into design view for a datasheet form and add a subform there.

Or is there something I'm missing?
 

Attachments

We ran into this with Northwind 2 Dev Edition, Employees form.
That one is a Split form, but same thing: a subform on the design surface turned into a subdatasheet.
 
I'm not a fan of datasheet views, but there's the possibility of making the subform lazy load the data to avoid the performance issues, maybe by making the subform empty by default and adding the data source dynamically only when needed. That'd be interesting to test.

I just remembered some users have posted threads about wanting to embed subforms in continuous forms, I've suggested reports inside reports, but this approach seems to be another option that does not deal with the limitations of reports. Instead, it will deal with the limitations of datasheet views, but with added benefits like having a recordset.
 
Last edited:
You can embed subforms in continuous forms but only in the header or footer section
 

Users who are viewing this thread

Back
Top Bottom