-
WSShane Sargent
AskWoody LoungerRather than a passive trap, perhaps try an active one with a “Create Case” command button situated just to the right of the two combo boxes. You’ll know when an OnClick events happens there! You can use the OnClick event to run any validation or error checking you’d like on the two combo boxes, and assuming an “all’s clear” from that, create the case number and unlock/reveal the remainder of the form.
-
WSShane Sargent
AskWoody LoungerWell isn’t that the darndest thing?! For completeness’ sake, the ultimate criteria I ended up with is:
CLng([Forms]![frm_Main]![frm_TicketViewer]![fk_StatusCodeID])
That is, ignore the fact that the subform is on a tab control, and cast the value in the referenced control as the necessary data type using the appropriate conversion function.
Thanks, all, for your help and suggestions. Cheers, Charlotte!
-
WSShane Sargent
AskWoody LoungerThanks, all, for the replies. I’m glad I’m not alone is not understanding what underlies this issue. To make it more confusing yet, I placed the following in the OnOpen event of frm_Main, and it works properly by displaying the value in the text box fk_StatusCodeID. But, the same syntax, with or without referencing the Value property, in a query as criteria doesn’t. Hmmmmm.
MsgBox Forms!frm_Main!frm_TicketView!fk_StatusCodeID.Value
I’m not far from just fetching the value in the field and changing the QueryDef behind the scenes, but for a number of reasons, would really rather not. Any more thoughts?
-
WSShane Sargent
AskWoody LoungerThanks for the quick reply, Pat, but still no dice.
-
WSShane Sargent
AskWoody LoungerOctober 23, 2002 at 8:03 pm in reply to: Updating combo box values using VBA loop (Access 97 SR-2) #626185Something along these lines should do the trick for you. Good luck!
Dim ctl As Control For Each ctl In Me.Controls If ctl.ControlType = acComboBox Then ctl.RowSource = "" End If Next
-
WSShane Sargent
AskWoody LoungerI’m not sure how you’re exporting your report, but if you’re using the OutputTo method, check out the AutoStart argument. The below line of code exports my report named “Rpt” to a Rich Text Format document named “MyReport.rtf” at the root of my D partition. The True value as the 5th argument is what tells the OS to fire up the application associated with .rtf files. Best of luck!
DoCmd.OutputTo acReport, "rpt", "RichTextFormat(*.rtf)", "D:MyReport.rtf", True, "", 0
-
WSShane Sargent
AskWoody LoungerThere are so many variables, network speed, processor/memory load on the SQL server, etc., that it’s tough to say. You may want to increase the ODBC timeout for your query, though, as it is set to 60 seconds by default. Right-click in the grey area of your query while in Design view, choose Properties, and you’ll see the ODBC Timout property. Good luck!
Edit: It should go without saying, though, that making a user wait for more than a minute for a query to return is a bit, er, excessive.
You may want to check out the beauty of pass-through queries, and place the processing load on the SQL server.
-
WSShane Sargent
AskWoody LoungerOctober 4, 2002 at 6:05 pm in reply to: Testing value in AD using DirectoryService NS (VB.NET) #621948I get the same error, Mike. You might try posting the issue in the MS newsgroup microsoft.public.adsi.general; I lurk there and bug the nice people with questions from time to time, almost always getting a more educated response than what I’m giving you now.
Good luck!
-
WSShane Sargent
AskWoody LoungerYou’re close, Ronald. To add a reference to the appropriate library, choose Add Reference from the Project menu. Click on the COM tab, and scroll down to the Microsoft Excel 10.0 Object Library. After you’ve added it, you should stop seeing the Blue Squiggle of Terror when you type something like:
Dim oExcel as New Excel.Application()
I believe you have to have Excel 2002 installed on the machine running VS.NET, though. You can check KB Q328912 for some info on downloading the Primary Interop Assemblies, another acronym for the dyslexicon, to work with Office XP COM libraries. Good luck!
-
WSShane Sargent
AskWoody LoungerYou’re a life saver — literally! Great hordes of nasty people were about to descend upon me! Thanks again!
-
WSShane Sargent
AskWoody Lounger“…and what setting would that be?”, asks the man who just received the same message after having changed from V4R4 to V5R1.
-
WSShane Sargent
AskWoody LoungerEureka!! Thanks, Steve, for staying with me! It makes good sense to me now, in practice if not in understanding why MS chose to implement the functionality that way, and has been put to good use. If you find yourself in Minneapolis, the pints are on me!
Cheers!
-
WSShane Sargent
AskWoody LoungerIf you can get that to work, Steve, you’re a better man than I. The below code doesn’t fire the AfterRefresh event for the QueryTable named LastRunDate.
Private Sub CommandButton1_Click() Sheets("Detail").QueryTables("LastRunDate").Refresh BackgroundQuery:=False End Sub Private Sub LastRunDate_AfterRefresh(Success As Boolean) MsgBox "Oh...I updated!" End Sub
All of Microsoft’s literature suggests that you first must code a seperate class module to declare a QueryTable object, then dance the Hokey-Pokey to get the nasty @#$!% to work. Has anybody, anywhere in the history of clever developers actually used the AfterRefresh event of a QueryTable? I’d trade a multitude of refreshments to see one working example pulling data from the Northwind mdb…
-
WSShane Sargent
AskWoody LoungerRight. Now if you can help me make sense of the example provided by MS on how to actually use the AfterRefresh event of a QueryTable, we’d be on to something. Check the Help topic “Using Events with the QueryTable Object” to see the source of my confusion.
-
WSShane Sargent
AskWoody LoungerSure. I have a worksheet with two seperate QueryTables. After both have refreshed, running queries against an Access mdb, I’d like to compare two cells, one from each query table. My code, as it stands in a single Sub, calls the ActiveWorkbook.RefreshAll method and then starts to compare the cells. The problem is that the comparison runs well before the RefreshAll finishes and so yields erroneous results.
So, the AfterRefresh event springs to mind as a good event to trap and use to compare the cells. However, the MS team is as helpful as ever in the Help file and I’m having a bit of trouble following the example they give on how to use the AfterRefresh event of a QueryTable.
![]() |
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 11 Insider Preview Build 26100.3902 (24H2) released to Release Preview
by
joep517
24 minutes ago -
Oracle kinda-sorta tells customers it was pwned
by
Nibbled To Death By Ducks
6 hours, 25 minutes ago -
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
16 hours, 45 minutes ago -
Office apps read-only for family members
by
b
19 hours, 22 minutes ago -
Defunct domain for Microsoft account
by
CWBillow
16 hours, 13 minutes ago -
24H2??
by
CWBillow
6 hours, 25 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
39 minutes ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
53 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
16 hours, 10 minutes ago -
two pages side by side land scape
by
marc
2 days, 17 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
2 days, 19 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
1 day, 22 hours ago -
Security Essentials or Defender?
by
MalcolmP
2 days ago -
April 2025 updates out
by
Susan Bradley
1 hour, 3 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
1 day, 18 hours ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
1 day, 8 hours ago -
Creating an Index in Word 365
by
CWBillow
2 days, 10 hours ago -
Coming at Word 365 and Table of Contents
by
CWBillow
22 hours, 54 minutes ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
3 days, 14 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
3 days, 17 hours ago -
W11 24H2 – Susan Bradley
by
G Pickerell
3 days, 19 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
3 days, 17 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
3 days, 10 hours ago -
I installed Windows 11 24H2
by
Will Fastie
1 day, 17 hours ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
3 days, 23 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
16 hours, 19 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
4 days, 7 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
3 days, 15 hours ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
3 days, 15 hours ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
5 days 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.