-
WSbfxtrfcmgr
AskWoody LoungerThanks! Short, clear, and to the point. I suppose the next question would be a philosophical one; like why would MS offer the option of converting macros to modules if it accomplished nothing more than revealing the code; but, I’m not going to go there, not ever. I think re-writing the code would be a worthwhile exercise for me, and perhaps even an improvement in the efficiency of the application. As per the feedback, I see that macros may be minimally effective, yet far from efficient. Armed with that awareness, I’m off to practice code. Hope I don’t do too much damage.
-
WSbfxtrfcmgr
AskWoody LoungerCharlotte,
I’m thinking perhaps I didn’t structure my question correctly.
Right click Macro, save as module. What, if anything, does that accomplish?
-
WSbfxtrfcmgr
AskWoody LoungerPat,
Thanks for your reply. I do understand the benefit of error handling in code. I just don’t get what converting macros to modules accomplishes.
-
WSbfxtrfcmgr
AskWoody LoungerO.K.
So, why convert to modules? The module looks no different to me than the macro (except that I can see the code). Is Access running the module, or the macro after conversion?
-
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 10:42 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665128Mark,
Yeah. Got it! (see rest of string).
Thanks for the code!!! (and replies)
-
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 7:56 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665084Hans,
Oh yeah. I like that, I like that a lot! Public Const; who’d have ever thought?
That deserves a -
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 7:23 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665074Hans,
Beginning to feel like a nanny yet?
Thanks for the reference (I was looking up “vb color”). I think I follow the logic of using ColorConstants. What I was interested in doing was finding out the numeric equivalent for the vb name of those colors you see in the “Fill/Back Color” button on the toolbar. I assumed (uh-oh) that these were SystemColorConstants, but while there may be vbGreen, there is no vbPaleGreen (Light, Dark, etc). What I have done is select a color from the toolbar and then looked to see what the numeric value is. I see the point as far as reading the code goes, so I added a description.
Public Function WhenGotFocus(ctl As Control)
ctl.BackColor = 13434828 ‘PaleGreen’
End FunctionThanks again!
(BTW, how do you post code in the format it was written? Indents, font, etc)
-
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 5:18 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665059Because vbGreen is the most ungodly looking thing. Is there a list of vb colors somewhere? Can’t find anything in help that tells you what colors are available (ie vbLightGreen?). Thanks again for your assist.
-
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 4:43 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665051Gosh, this is humiliating.
Bit of a typo issue! All better now. BTW, can one use a color “code” (ie 255 instead of vbRed)? I would like to enter:
ctl.BackColor =52377
Does the number require special handling (brackets, etc)? Thanks for all your patience!!
-
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 4:13 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665047I suppose what I’m missing here (aside from the brain cell count) is that “ctl” would be the name of the control? Is that the name of each and every particular text-box, msg-box, combo-box; or, is there a generic name for all text-boxes, combo-boxes, etc?
-
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 3:36 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665044Charlotte,
1.”You aren’t returning the form’s backcolor, you’re making the rectange with a different backcolor visible by setting the control’s backstyle to transparent” What “rectangle” would that be?
2. I copied/pasted the code.
Important: I’m not the sharpest tack in the box.
-
WSbfxtrfcmgr
AskWoody LoungerMarch 30, 2003 at 2:52 pm in reply to: Changing a controls properties as it gets the focu (97 if possible) #665032Mark,
Is that precisely the code to be entered? I still get a runtime error. I like Hans’ simple solution, but in my case I don’t want to return the Form BackColor. Might you re-post the complete (edited) code?
-
WSbfxtrfcmgr
AskWoody LoungerHans,
Funny how one one revision seems to lead to another, and another,and… I am very pleased with the results of this most resent journey, but most grateful for the lessons learned along the way. While VBA results are certainly the immediate target, the learning process has the greatest long-term benefit. I became most frustrated when I tried to get Access to “think” the way I do, but really started getting somewhere when I attempted to think the way Access operates. Long way to go, but at least I’m on the way.
(Forms!frmLoadBoardTenDay versus Me.Refresh…Duh! Like I said, long way to go)
-
WSbfxtrfcmgr
AskWoody LoungerThis is a bit off the original subject, but (after a nap) I began to see the “refresh” issue a bit differently and turned a mountain into a mole hill. I went back to the Timer Event for frmLoadBoardTenDay and simply ammended the code. Now the new “conditional” color display refresh’s every 60 seconds, regardless if a new order has been entered.
Private Sub Form_Timer()
Dim lngCount As Long
lngCount = DCount(“*”, “tblMaster”, “OrderStatus=’NEW'”)
If lngCount > 0 Then
Searching.Caption = “New order(s) found. Click ‘refresh’ to display: ” & lngCount
Searching.BackStyle = 1 ‘ Normal
Else
Searching.Caption = ” ”
Searching.BackStyle = 0 ‘ Transparent
End If
Forms!frmLoadBoardTenDay.Requery
End SubA WORD OF CAUTION: This is a single user application. I have been advised against Timer event ReQueries in multi-user environments.
Thanks again to Hans and Steve for all the code, examples, and most importantly, the learning experience. I am humbled by your generousity and hope I can (some day) return the favor to other members.
-
WSbfxtrfcmgr
AskWoody LoungerI was able to figure out a way around hitting cmdRefresh every time an edit is made on frmOrderDetail. I used the On Close event in frmOrderDetail to run (don’ be laughing now) a machro that closes and reopens frmLoadBoardTenDay. OK, so it’s a little bit funky with the screen flash and all, but I just couldn’t come up with anything else. Requery seems to be more for controls (or current focus forms). If you have some more “magic” in your hat for an issue like this, by all means give me a shout (that’s an open invitation to all BTW).
![]() |
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
-
Difface : Reconstruction of 3D Human Facial Images from DNA Sequence
by
Alex5723
19 minutes ago -
Seven things we learned from WhatsApp vs. NSO Group spyware lawsuit
by
Alex5723
41 minutes ago -
Outdated Laptop
by
jdamkeene
5 hours, 45 minutes ago -
Updating Keepass2Android
by
CBFPD-Chief115
11 hours, 10 minutes ago -
Another big Microsoft layoff
by
Charlie
10 hours, 50 minutes ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
1 hour, 47 minutes ago -
May 2025 updates are out
by
Susan Bradley
11 hours, 14 minutes ago -
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
16 hours, 53 minutes ago -
Windows 11 Insider Preview build 26120.3964 (24H2) released to BETA
by
joep517
16 hours, 55 minutes ago -
Drivers suggested via Windows Update
by
Tex265
16 hours, 46 minutes ago -
Thunderbird release notes for 128 esr have disappeared
by
EricB
14 hours, 30 minutes ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
23 hours, 46 minutes ago -
Apple releases 18.5
by
Susan Bradley
18 hours, 11 minutes ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
1 day, 1 hour ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
1 day, 1 hour ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
9 hours, 5 minutes ago -
No HP software folders
by
fpefpe
1 day, 9 hours ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
6 hours, 50 minutes ago -
Stay connected anywhere
by
Peter Deegan
1 day, 14 hours ago -
Copilot, under the table
by
Will Fastie
1 day, 6 hours ago -
The Windows experience
by
Will Fastie
1 day, 21 hours ago -
A tale of two operating systems
by
Susan Bradley
1 hour, 21 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
2 days, 2 hours ago -
Where’s the cache today?
by
Up2you2
2 days, 17 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
2 days, 10 hours ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
1 day, 10 hours ago -
Blocking Search (on task bar) from going to web
by
HenryW
13 hours, 7 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
3 days, 11 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
3 days, 11 hours ago -
regarding april update and may update
by
heybengbeng
3 days, 12 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.