-
WSAlexya1
AskWoody LoungerThanks Wendell… but the problem I’m having is with the syntax…
This is what I have so far for the code…Dim acApp As Object ‘ Declare variable to hold the reference.
Dim acDatabase As DAO.DatabaseSet acApp = GetObject(“C:Documents and SettingstreaspaDesktopdb1.mdb”)
With acApp
.Visible = True
.DoCmd.OpenForm “Form1”
.Forms(“Form1”).frmOptions = 1
.Forms(“Form1”).cmdDone.SetFocus
‘cmdDone_Click ‘this is where I don’t know how to enter the command… I’ve tried a few things but I can’t get it right…
.Quit
End WithSet acApp = Nothing
End Function
P.S. This is just a sample… Not the real thing…
-
WSAlexya1
AskWoody LoungerDecember 8, 2003 at 8:33 pm in reply to: How to Return Jet Version Number? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7) #754661This will have to be adapted… but check out this link…
http://www.granite.ab.ca/access/verifyjetsp.htm%5B/url%5DHopefully it’s a start for you anyway…
-
WSAlexya1
AskWoody LoungerDecember 8, 2003 at 8:33 pm in reply to: How to Return Jet Version Number? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7) #754662This will have to be adapted… but check out this link…
http://www.granite.ab.ca/access/verifyjetsp.htm%5B/url%5DHopefully it’s a start for you anyway…
-
WSAlexya1
AskWoody LoungerI’m assuming you mean that you want to return the label caption property that corresponds with the option button selected?
If so, there are at least a couple of options for you… Depending on how many option buttons are in the group…You could use an IIF statement and nest the results… For example:
fldChoice: IIf([Forms]![frmName].[optGroupName]=1,[Forms]![frmName].[lblOneName].[Caption],IIf([Forms]![frmName].[optGroupName]=2, [Forms]![frmName].[lblTwoName].[Caption], [Forms]![frmName].[lblOneName].[Caption])Or you could try something like the Choose function…
=Choose([Forms]![frmName].[optGroupName], [Forms]![frmName].[lblOneName].[Caption], [Forms]![frmName].[lblTwoName].[Caption],[Forms]![frmName].[lblThreeName].[Caption])(of course, you’ll have to change the names I’ve used to your own… )
The Choose looks cleaner… but I haven’t tested it… Give both a try…
HTH… -
WSAlexya1
AskWoody LoungerI’m assuming you mean that you want to return the label caption property that corresponds with the option button selected?
If so, there are at least a couple of options for you… Depending on how many option buttons are in the group…You could use an IIF statement and nest the results… For example:
fldChoice: IIf([Forms]![frmName].[optGroupName]=1,[Forms]![frmName].[lblOneName].[Caption],IIf([Forms]![frmName].[optGroupName]=2, [Forms]![frmName].[lblTwoName].[Caption], [Forms]![frmName].[lblOneName].[Caption])Or you could try something like the Choose function…
=Choose([Forms]![frmName].[optGroupName], [Forms]![frmName].[lblOneName].[Caption], [Forms]![frmName].[lblTwoName].[Caption],[Forms]![frmName].[lblThreeName].[Caption])(of course, you’ll have to change the names I’ve used to your own… )
The Choose looks cleaner… but I haven’t tested it… Give both a try…
HTH… -
WSAlexya1
AskWoody LoungerI’m assuming there is already a text box control in the report design that gets it’s value from input value in tblPropertyName…
If so, just change the control source property to:
= DSum(“[RoomProration]”, “qryNCTotalTaxExempt”)If you want to read more about this, lookup Domain Aggregate functions in Access Help…
HTH -
WSAlexya1
AskWoody LoungerI’m assuming there is already a text box control in the report design that gets it’s value from input value in tblPropertyName…
If so, just change the control source property to:
= DSum(“[RoomProration]”, “qryNCTotalTaxExempt”)If you want to read more about this, lookup Domain Aggregate functions in Access Help…
HTH -
WSAlexya1
AskWoody LoungerThis is probably to do with having other fields in your query with different values… If you do, ask yourself how you know which record with 18 in the topvalue field is the one you want?… Is there another field that answers that question… and is it string, number, date, etc data?
Post back with sample data and/or the sql if you need help figuring it out…
-
WSAlexya1
AskWoody LoungerThis is probably to do with having other fields in your query with different values… If you do, ask yourself how you know which record with 18 in the topvalue field is the one you want?… Is there another field that answers that question… and is it string, number, date, etc data?
Post back with sample data and/or the sql if you need help figuring it out…
-
WSAlexya1
AskWoody LoungerHi John… Great example! … Thanks…
For those who are following the thread, I got a sample of the database and fixed it up with pbrown…
We got the control and field names figured out and the code looks very similar to John’s… He did have one other problem though… The “[Parts] = Altima…” part was a mistake… The data in the Parts field was nothing like that… which meant that he got no records returned… Hence the Errors all over the report… -
WSAlexya1
AskWoody LoungerHi John… Great example! … Thanks…
For those who are following the thread, I got a sample of the database and fixed it up with pbrown…
We got the control and field names figured out and the code looks very similar to John’s… He did have one other problem though… The “[Parts] = Altima…” part was a mistake… The data in the Parts field was nothing like that… which meant that he got no records returned… Hence the Errors all over the report… -
WSAlexya1
AskWoody LoungerSorry it took so long for me to answer… Duty called…
Sure… I sent you a private message with my work email address…
I don’t know if I’m allowed to post it here… and while I’m at work I can’t get at my online email account anyway…
I’ll continue posting my advice and questions on here though…Thanks for suggesting it Pat! I’m dying to get a look at this thing…
-
WSAlexya1
AskWoody LoungerSorry it took so long for me to answer… Duty called…
Sure… I sent you a private message with my work email address…
I don’t know if I’m allowed to post it here… and while I’m at work I can’t get at my online email account anyway…
I’ll continue posting my advice and questions on here though…Thanks for suggesting it Pat! I’m dying to get a look at this thing…
-
WSAlexya1
AskWoody LoungerOkee dokee… Unfortunately it doesn’t look like I’m going to get to see this thing, so let’s try this one piece at a time…
First of all… Let’s talk about the report Sort…
1) I don’t know why you would have put that SortBy field in the query… If the recordsource for the “General Info” Report contain the fields, [Project Classification] and [Y1Sum], and those are the fields you want to sort on that is all you need…
2) DoCmd.OpenReport does not have a Sorting argument so I would just use the Report object itself and the OrderBy property… For example… The following code will open the report needed and set the OrderBy property as well as turn OrderByOn property to True… This is assuming I’m understanding correctly and you have a control option group called “grpSortBy” on the form with three different Options… The user having selected 1 meaning “sort the report by Y1Sum”, 2 meaning “sort the report by Project Classification” and 3 meaning
-
WSAlexya1
AskWoody LoungerOkee dokee… Unfortunately it doesn’t look like I’m going to get to see this thing, so let’s try this one piece at a time…
First of all… Let’s talk about the report Sort…
1) I don’t know why you would have put that SortBy field in the query… If the recordsource for the “General Info” Report contain the fields, [Project Classification] and [Y1Sum], and those are the fields you want to sort on that is all you need…
2) DoCmd.OpenReport does not have a Sorting argument so I would just use the Report object itself and the OrderBy property… For example… The following code will open the report needed and set the OrderBy property as well as turn OrderByOn property to True… This is assuming I’m understanding correctly and you have a control option group called “grpSortBy” on the form with three different Options… The user having selected 1 meaning “sort the report by Y1Sum”, 2 meaning “sort the report by Project Classification” and 3 meaning
![]() |
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 |

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 7 ISO /Windows 10 ISO
by
ECWS
5 hours, 34 minutes ago -
No HP software folders
by
fpefpe
6 hours, 19 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
1 hour, 23 minutes ago -
Stay connected anywhere
by
Peter Deegan
11 hours, 41 minutes ago -
Copilot, under the table
by
Will Fastie
2 hours, 55 minutes ago -
The Windows experience
by
Will Fastie
17 hours, 56 minutes ago -
A tale of two operating systems
by
Susan Bradley
8 hours, 52 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
23 hours, 15 minutes ago -
Where’s the cache today?
by
Up2you2
1 day, 14 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
1 day, 7 hours ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
7 hours, 41 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
1 day, 15 hours ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
2 days, 7 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
2 days, 7 hours ago -
regarding april update and may update
by
heybengbeng
2 days, 9 hours ago -
MS Passkey
by
pmruzicka
1 day, 11 hours ago -
Can’t make Opera my default browser
by
bmeacham
2 days, 17 hours ago -
*Some settings are managed by your organization
by
rlowe44
2 days, 3 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
2 days, 16 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 days, 11 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
3 days, 20 hours ago -
AI slop
by
Susan Bradley
1 day, 14 hours ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
3 days, 22 hours ago -
Two blank icons
by
CR2
1 day, 6 hours ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 8 hours ago -
End of 10
by
Alex5723
4 days, 9 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
3 days, 7 hours ago -
test post
by
gtd12345
4 days, 15 hours ago -
Privacy and the Real ID
by
Susan Bradley
4 days, 5 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
2 days, 8 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.