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
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
3 hours, 19 minutes ago -
Test post
by
Susan Bradley
5 hours, 33 minutes ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
7 hours, 14 minutes ago -
SSD shuts down on its own
by
CWBillow
2 hours, 55 minutes ago -
OneDrive File Sharing Changes
by
David Clark
15 hours, 18 minutes ago -
OneDrive File Sharing Changes
by
David Clark
17 hours, 21 minutes ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
5 hours, 5 minutes ago -
Today is world backup day
by
Alex5723
8 hours, 58 minutes ago -
Windows .exe on Mint
by
Slowpoke47
18 hours, 54 minutes ago -
Reviewing your licensing options
by
Susan Bradley
4 hours, 39 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
13 hours, 58 minutes ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
9 hours, 15 minutes ago -
Making sense of Settings in Windows 11
by
Simon Bisson
5 hours, 12 minutes ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
15 hours, 11 minutes ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
12 hours, 58 minutes ago -
YouTube Ad Blocker Blocker
by
bbearren
13 hours, 9 minutes ago -
Obscure historical facts about Windows
by
Cybertooth
14 hours, 46 minutes ago -
Microsoft Backup
by
Linda2019
6 hours, 31 minutes ago -
What is the best notepad++ version for W7?
by
Picky
14 hours, 1 minute ago -
What are right steps to move MS 365 Office+OneDrive files from PC to iMac?
by
glnz
1 day, 23 hours ago -
How to move existing MS 365 Office with OneDrive files from PC to new iMac
by
glnz
1 day, 23 hours ago -
How to move MS 365 files (some on OneDrive) from PC to iMac
by
glnz
2 days, 18 hours ago -
Microsoft adding Quick Machine Recovery to Windows 11
by
Alex5723
2 days, 18 hours ago -
Microsoft vs Passwords
by
Alex5723
2 hours, 24 minutes ago -
Windows 11 Insider Preview build 26200.5516 released to DEV
by
joep517
2 days, 22 hours ago -
Windows 11 Insider Preview build 26120.3653 (24H2) released to BETA
by
joep517
2 days, 22 hours ago -
Two March KB5053606 updates?
by
Adam
2 days, 16 hours ago -
MS Edge Not Updating to v134.0.3124.95 (rel. 27-Mar-2025)
by
lmacri
2 days, 16 hours ago -
Intel® Graphics/Sound Driver updates for 7th-10th Gen Intel® Core™ Processor
by
Alex5723
2 days, 19 hours ago -
Is there a comprehensve way to tranfer ALL current Edge Settings into a new Edge
by
Tex265
2 days, 17 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
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.