I have a small db of personal books with a tbl for authors and a tbl for books grouped by type. The main form is based on author with a subform for the books. i am sure I should be able to open the main form with a ‘where’ condition related to type on the subform but I can’t get the syntax right.
Can anyone help.
eg
Docmd.Openform “MainForm” _ WhereCondition:= “subform.Form![choice] = “myInput”
Thanks
Peter
![]() |
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 |
-
OpenForm from subForm (A2k sp1)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » OpenForm from subForm (A2k sp1)
- This topic has 8 replies, 3 voices, and was last updated 22 years, 10 months ago.
AuthorTopicWSherworth
AskWoody LoungerJune 6, 2002 at 6:50 pm #371958Viewing 0 reply threadsAuthorReplies-
WSMarkLiquorman
AskWoody LoungerJune 6, 2002 at 10:35 pm #592998your wrote:
>>The main form is based on author with a subform for the books. i am sure I should be able to open the main form with a ‘where’ condition related to type on the subform <<Peter,
I'm not sure I understand what you mean. The mainform must already be opened for you to see the subform, so what do mean by wanting to "open the main form"?
-
WSherworth
AskWoody LoungerJune 7, 2002 at 6:11 pm #593221Sorry folks – I should have explained better. Let me try again.
Db opens to a form which is a menu of choices with command buttons. I choose a set of books by clicking a button and opening what I originally called the mainform, filtered to the appropriate list (F, P or O). So if I press “F” I get the main form with all the authors [Author] for “F” and the subform of all the book entries for those authors (to add, amend or print).
So the code behind the button reads something like:
DoCmd.OpenForm “MainForm”, wherecondition:=”[Choice]=’F'”
At the moment [Choice] (F, P or O) is on the main form but I would like it to be in the sub form ( for good reasons which needn’t go in to). So the code could then read something like:
DoCmd,OpenForm “MainForm”, wherecondition:=”subform.form![choice]=’F'” but that doesn’t work.
I hope that’s clearer. Anyone help??
Peter -
WSMarkLiquorman
AskWoody Lounger -
WSherworth
AskWoody Lounger -
WScharlotte
AskWoody LoungerJune 8, 2002 at 2:48 am #593330No, it doesn’t. You can’t open a main form based on a value in its subform, because the values in the subform depend on the value in the main form. This question has been wrestled with a number of times in this forum, so you might want to do a lounge search to see what alternatives have been suggested in the past.
-
WSherworth
AskWoody Lounger -
WSMarkLiquorman
AskWoody Lounger -
WSherworth
AskWoody Lounger
-
-
-
-
Viewing 0 reply threads -

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
-
Windows 11 Insider Preview build 26200.5518 released to DEV
by
joep517
1 hour, 56 minutes ago -
Windows 11 Insider Preview build 26120.3671 (24H2) released to BETA
by
joep517
1 hour, 58 minutes ago -
Forcing(or trying to) save Local Documents to OneDrive
by
PateWilliam
10 hours, 50 minutes ago -
Hotpatch for Windows client now available (Enterprise)
by
Alex5723
11 hours, 29 minutes ago -
MS-DEFCON 2: Seven months and counting
by
Susan Bradley
32 minutes ago -
My 3 monitors go black & then the Taskbar is moved to center monitor
by
saturn2233
21 hours, 45 minutes ago -
Apple backports fixes
by
Susan Bradley
2 hours, 20 minutes ago -
Win 11 24H2 will not install
by
Michael1950
21 hours, 59 minutes ago -
Advice to convert MBR to GPT and install Windows 11 Pro on unsupported PC
by
Andy M
21 hours, 30 minutes ago -
Photos from iPhone to Win 10 duplicating/reformatting to .mov
by
J9438
7 hours, 10 minutes ago -
Thunderbird in trouble. Here comes Thundermail
by
Alex5723
21 hours, 46 minutes ago -
Get back ” Open With” in context menus
by
CWBillow
1 day, 10 hours ago -
Many AMD Ryzen 9800X3D on ASRock have died
by
Alex5723
2 hours, 39 minutes ago -
simple general stupid question
by
WSaltamirano
1 day, 8 hours ago -
April 2025 Office non-Security updates
by
PKCano
2 days, 1 hour ago -
Microsoft wants to hear from you
by
Will Fastie
1 day, 1 hour ago -
Windows 11 Insider Preview Build 22635.5160 (23H2) released to BETA
by
joep517
2 days, 5 hours ago -
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
2 days, 10 hours ago -
Test post
by
Susan Bradley
2 days, 12 hours ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
2 days, 14 hours ago -
SSD shuts down on its own
by
CWBillow
2 days, 5 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 22 hours ago -
OneDrive File Sharing Changes
by
David Clark
3 days ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
2 days ago -
Today is world backup day
by
Alex5723
2 days, 16 hours ago -
Windows .exe on Mint
by
Slowpoke47
2 hours, 38 minutes ago -
Reviewing your licensing options
by
Susan Bradley
10 hours, 35 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
26 minutes ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
1 day, 17 hours ago -
Making sense of Settings in Windows 11
by
Simon Bisson
1 day, 18 hours ago
Recent blog posts
- MS-DEFCON 2: Seven months and counting
- Apple backports fixes
- April 2025 Office non-Security updates
- Microsoft wants to hear from you
- Reviewing your licensing options
- Apple has been analyzing your photos since September 2024
- What Windows 11 24H2 offers beyond bugs
- Making sense of Settings in Windows 11
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.