Dear members of the board,
suppose I would create a form to ‘fake’ a setup with a datasheet form and datasheet subforms, with a (rough) setup like a form including both:
– one datasheet showing the ‘main’ data
– some embedded datasheet form(s) or subform(s) of which the data source depends on the active record in the first datasheet.
Without heading into technical details (I assume it must be possible using some VBA), I wonder: are there any particular problems I’ll probably face? And… does anyone have seen already examples of this approach?
Hasse
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Datasheet form subform workaround (97)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Datasheet form subform workaround (97)
- This topic has 9 replies, 2 voices, and was last updated 20 years, 2 months ago.
AuthorTopicWShasse
AskWoody LoungerMarch 29, 2004 at 6:30 pm #402987Viewing 1 reply threadAuthorReplies-
WBell
AskWoody_MVPMarch 29, 2004 at 6:36 pm #806462Actually, if I understand what you are trying to do, you shouldn’t need any VBA to do what you are asking. The Main form would be a continuous form that looks like a datasheet for the first row of the form, and then a subform control that refers to a subform that is displayed in datasheet form. If you have multiple subforms, they would be stacked one beneath the other, or possibly side by side, though that could get ugly. Does that sound like what you are attempting to achieve? That would look something like the subdatasheets that you can use in 2000 and up, but cause nasty performance problems.
-
WShasse
AskWoody LoungerMarch 30, 2004 at 4:31 pm #807088Hey, Wendell,
I’m just not quiet sure how to understand ‘a datasheet for the first row of the form’ but that’s probably because of my own wobby writing…
Just to be sure, I’ll rewrite my question: in a continuous or datasheet form, Access doesn’t allow subforms.
As a workaround I would like to assemble in one form (1) a continuous form (or an ’empty’ one with an embedded datasheet form) (2) in the same form (e.g. in footer continuous form) another embedded form (subform not allowed!) showing all records related to the active record in the first form. Now I was wondering: how I get both controls linked? (Layout to avoid as much uglyness as possible is the next step)
I’ll try to post an example later on, and in any case read over your post again this evening.
Thanks!
Hasse -
WBell
AskWoody_MVPMarch 30, 2004 at 5:51 pm #807116Hi Hasse,
You are absolutely correct – you cannot have a subform control on a continuous form. Momentary lapse on my part
So I’m afraid you will need to resort to VBA, and even then it will get ugly – there are two real issues if you must have a continuous form:- subforms can have many records so you would have to put a set number of controls to display a fixed number of records, and
- controls on a subform cannot be addressed on a record-by-record basis.[/list]I’ll do a bit of research and see if anybody has a workaround, but at this point it sounds like lots more work than I would want to tackle.
-
WBell
AskWoody_MVPMarch 30, 2004 at 5:51 pm #807117Hi Hasse,
You are absolutely correct – you cannot have a subform control on a continuous form. Momentary lapse on my part
So I’m afraid you will need to resort to VBA, and even then it will get ugly – there are two real issues if you must have a continuous form:- subforms can have many records so you would have to put a set number of controls to display a fixed number of records, and
- controls on a subform cannot be addressed on a record-by-record basis.[/list]I’ll do a bit of research and see if anybody has a workaround, but at this point it sounds like lots more work than I would want to tackle.
-
WBell
AskWoody_MVPMarch 30, 2004 at 7:10 pm #807172After some digging, the general advice seems to be to find another way to display the data if possible – see http://p2p.wrox.com/topic.asp?TOPIC_ID=3730%5B/url%5D for example. Since you are using 97, a technique suggested at http://dbforums.com/arch/217/2002/10/527516%5B/url%5D won’t work as it requires 2000 or later. If you look under the “L” category on http://www.rogersaccesslibrary.com[/url%5D there is a database which uses a ListBox to simulate a subform – that might be a possibility if your subform is quite simple. That is about the best I can do – perhaps someone else has another idea.
-
WBell
AskWoody_MVPMarch 30, 2004 at 7:10 pm #807173After some digging, the general advice seems to be to find another way to display the data if possible – see http://p2p.wrox.com/topic.asp?TOPIC_ID=3730%5B/url%5D for example. Since you are using 97, a technique suggested at http://dbforums.com/arch/217/2002/10/527516%5B/url%5D won’t work as it requires 2000 or later. If you look under the “L” category on http://www.rogersaccesslibrary.com[/url%5D there is a database which uses a ListBox to simulate a subform – that might be a possibility if your subform is quite simple. That is about the best I can do – perhaps someone else has another idea.
-
-
WShasse
AskWoody LoungerMarch 30, 2004 at 4:31 pm #807089Hey, Wendell,
I’m just not quiet sure how to understand ‘a datasheet for the first row of the form’ but that’s probably because of my own wobby writing…
Just to be sure, I’ll rewrite my question: in a continuous or datasheet form, Access doesn’t allow subforms.
As a workaround I would like to assemble in one form (1) a continuous form (or an ’empty’ one with an embedded datasheet form) (2) in the same form (e.g. in footer continuous form) another embedded form (subform not allowed!) showing all records related to the active record in the first form. Now I was wondering: how I get both controls linked? (Layout to avoid as much uglyness as possible is the next step)
I’ll try to post an example later on, and in any case read over your post again this evening.
Thanks!
Hasse -
WShasse
AskWoody LoungerMarch 21, 2005 at 1:45 pm #936182(one year later… another time, another database… I realise my approach was wrong… at least for my case)
It is far better and simpler to use two synchronized datasheet subforms side by side (the second showing only records related to the current record in the first subform) than trying to incorporate one inside another…
So, Wendell, thanksfor your (first) answer as this is what you actually suggested… I think …
Method: the actual ‘parent’ subform’s ID is stored in a hidden text box on the parent form to which you can refer at the ‘child’ subforms’ LinkChildFields property. This is among others discussed in:
– Access 2002 Desktop Dev Handbook p.502 “Using synchronised forms”: ‘feeding’ the hidden text box value through code from inside the ‘parent’ subform (preferred);
– Luna Systems Access Tips: uses the hidden text box’ record source property to link it directly to the ‘parent’ subform ID control. In my case, this was impossible to work with as my form refreshed constantly at a high frequency (probably because I referred to the parent subform’s ID field (… !ID) and not to the ID field’s control (… .IDControl)).One constraint: future must tell if this technique isn’t too difficult for the users… as e.g. the list box alternative is far more dummy proof. Bob Bedell has a good point on this in the discussion you referred to in your previous post.
-
-
WBell
AskWoody_MVPMarch 29, 2004 at 6:36 pm #806463Actually, if I understand what you are trying to do, you shouldn’t need any VBA to do what you are asking. The Main form would be a continuous form that looks like a datasheet for the first row of the form, and then a subform control that refers to a subform that is displayed in datasheet form. If you have multiple subforms, they would be stacked one beneath the other, or possibly side by side, though that could get ugly. Does that sound like what you are attempting to achieve? That would look something like the subdatasheets that you can use in 2000 and up, but cause nasty performance problems.
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Xfinity home internet
by
MrJimPhelps
2 hours, 4 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
4 hours, 3 minutes ago -
Debian 12.11 released
by
Alex5723
12 hours, 29 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
16 hours, 11 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
2 hours, 33 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
12 hours, 39 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 9 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
23 hours, 31 minutes ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 11 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 4 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
11 hours, 35 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
4 hours, 26 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 21 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 17 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 7 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 11 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
19 hours, 10 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
7 hours, 48 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 13 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 13 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 2 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
2 days, 22 hours ago -
0Patch, where to begin
by
cassel23
2 days, 16 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 11 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
2 days, 23 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 20 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
3 days, 11 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
13 hours, 24 minutes ago -
Installer program can’t read my registry
by
Peobody
5 hours, 18 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
3 days, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.