-
WSCecilia
AskWoody LoungerI was just reading about autoexec, and it seems to take place at a different time than anything that’s set to startup….
Have you tried starting the form on startup (Tools–>Startup and then identify your form as the startup form) instead? I don’t know that it’ll make much of a difference, but you never know.
I always did have problems with TransferDatabase, I ended up with all sorts of error handling that if it wasn’t copied properly, do it again & again until it came out right. Usually took two or three rounds for the objects to copy properly (in 97).
-
WSCecilia
AskWoody LoungerSure, just put an IIF statement in there.
For example,
=[Forms]![frmCriteriaHP]![txtDateType].[Caption] & ” ” & [Forms]![frmCriteriaHP]![txtStartDate].[Caption] & IIF(txtStartDate=””,””,” Thru “) & [Forms]![frmCriteriaHP]![txtEndDate].[Caption] -
WSCecilia
AskWoody LoungerFebruary 6, 2002 at 4:55 pm in reply to: Database Container on Startup (Access 97 on Win 98) #568607Okay, I modified this code to identify whether the user is an admin (if so, show the db container) or an end user (don’t show container & just run the code): [If you’re an admin, you have a shortcut with Admin in the command line]
Function CheckCommandLine()
‘ Check value returned by Command function.
If Command = “Admin” Then
SetStartupProperties True
Else
If SetStartupProperties(False) = True Then
UpdateUsers ‘automatically run update code
End If
End If
End FunctionFunction SetStartupProperties(blnProtected As Boolean) As Boolean
SetStartupProperties = False
ChangeProperty “StartupShowDBWindow”, dbBoolean, blnProtected
ChangeProperty “StartupShowStatusBar”, dbBoolean, blnProtected
ChangeProperty “AllowBuiltinToolbars”, dbBoolean, blnProtected
ChangeProperty “AllowFullMenus”, dbBoolean, blnProtected
ChangeProperty “AllowBreakIntoCode”, dbBoolean, False
ChangeProperty “AllowSpecialKeys”, dbBoolean, False
ChangeProperty “AllowBypassKey”, dbBoolean, True
SetStartupProperties = True
End FunctionFunction ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
On Error GoTo HandleError
Dim db As Database
Dim prp As PropertyConst conPropNotFoundError = 3270
Set db = CurrentDb()
db.Properties(strPropName) = varPropValue
ChangeProperty = TrueExit Function
HandleError:
Select Case Err
Case conPropNotFoundError
Set prp = db.CreateProperty(strPropName, varPropType, varPropValue)
db.Properties.Append prp
Resume Next
Case Else
ChangeProperty = False
MsgBox Err.Number & ” ” & Err.Description, , “Change Property Error”
End SelectEnd Function
The problem is whether or not the container properties are set up properly….If I open the database with the admin shortcut, the first time the container will be locked down and won’t show, but the end user code won’t run. The second time I open it, the container will be (properly) open.
If I open the db without the Admin command line, the opposite happens the first time (the container improperly shows), but the end user code (properly) runs. The second time around the container properly is hidden.
As a side note, for some reason the default toolbar _always_ shows when you run the db as an end user (without the admin line).
So what I’m dealing with is a delay in when the properties are effective for the database. Any ideas? Please? I’m going nuts about now & need to get this darned thing out the door.
Cecilia
-
WSCecilia
AskWoody LoungerBingo!!!! Muchas gracias! Had my quotes all wrong.
One double quote to start, then surround the file path with two double quotes, end with the one double quote. Guess I couldn’t see all that on the screen. Works like a charm
-
WSCecilia
AskWoody LoungerI’m guessing that it’s Win 95/98 that’s the problem, then.
Here’s what I’m using now:
Call Shell(“Excel.exe c:Progra~1Micros~1TemplatesfoUBPRTemp.xls”, 1)This doesn’t work because of the spaces:
Call Shell(“Excel.exe c:Program FilesMicrosoft OfficeTemplatesfoUBPRTemp.xls”, 1)And neither does:
Call Shell(“‘Excel.exe’ ‘c:Program FilesMicrosoft OfficeTemplatesfoUBPRTemp.xls'”, 1)
(with or without full path to Excel, it can’t seem to find excel with the extra quote around it.) -
WSCecilia
AskWoody LoungerThanks Charlotte.
I think I’m going to consider myself defeated and go redesign my form. Bummer.
-
WSCecilia
AskWoody LoungerHi Jayden–
Thanks for the insight. Yes, it helps because at least I know what the problem is.
Now the question remains–Is there a workaround?
C
-
WSCecilia
AskWoody LoungerHey, now that I’ve made some design changes, this might work. Thanks!
-
WSCecilia
AskWoody LoungerWell, that’s not really what I wanted to do. I just wanted to be able to capture the event so I could do my own error handling and cleanup, because I want them to be able to delete sheets.
I did come up with a solution for my application’s problem, although I’m still interested in why we don’t have access to this event. I haven’t played with XP yet, does anyone know if that’s any different?
In case anyone’s interested, here’s what I did: my worksheets are no longer linked by formulas. Instead, I wrote code that verified whether the source worksheet (the one that was formerly linked) exists, and if it does and one of its numbers change, then it updates the total on the target worksheet. All the formulas are in code and there are no formulas in the worksheet. So if one of the worksheets is missing, all that happens is that the target worksheet’s totals become static. This is pretty much what I wanted in the first place.
-
WSCecilia
AskWoody LoungerHi Mark–
That’s a really cool example, but I can’t seem to get it to work. I pretty much used the example from the help file:
Sub ResetWindowSize(frm As Form)
Dim intWindowHeight As Integer
Dim intWindowWidth As Integer
Dim intTotalFormHeight As Integer
Dim intTotalFormWidth As Integer
Dim intHeightHeader As Integer
Dim intHeightDetail As Integer
Dim intHeightFooter As Integer‘ Determine form’s height.
intHeightHeader = frm.Section(acHeader).Height
intHeightDetail = frm.Section(acDetail).Height
intHeightFooter = frm.Section(acFooter).Height
intTotalFormHeight = intHeightHeader + intHeightDetail + intHeightFooter
‘ Determine form’s width.
intTotalFormWidth = frm.Width
‘ Determine window’s height and width.
intWindowHeight = frm.InsideHeight
intWindowWidth = frm.InsideWidthIf intWindowWidth intTotalFormWidth Then
frm.InsideWidth = intTotalFormWidth
End If
If intWindowHeight intTotalFormHeight Then
frm.InsideHeight = intTotalFormHeight
End If
End SubAnd then did ResetWindowSize Me in the after update of the combo that controls the form size.
I kind of expected this to work, as the footer (and detail) is set to both can grow and can shrink, and the form is set to autoresize. Somehow, though, it didn’t respond to this. Maybe I missed something?
Cecilia 🙂
-
WSCecilia
AskWoody LoungerThank you thank you thank you!!!!!
Just getting rid of that fixed everything else! I can’t believe it! (You would think that a problem with one event procedure would only affect that one event procedure, but it affected the whole form! Go figure….)
Thanks again,
Cecilia 🙂
-
WSCecilia
AskWoody LoungerActually, that was one of the first things I tried. But then certain things like AutoNew and AutoOpen weren’t available. It was just a big mess.
Anyway, I seem to have struck a deal with TPTB. I created a toolbar of documents for the field users. Now they have all the forms at their disposal even offline, and all the code works properly (and the documents have their templates!). The only web pages are the installation instructions (a batch file that loads the main template) and the update pages, showing which documents have been updated.
I’m quite a happy camper at the moment. Only one person doesn’t see how this has streamlined the process, but you can’t please everybody!
-
WSCecilia
AskWoody LoungerHi Drk–
The $65 upgrade was a full upgrade from Win 95 to SE, I believe. Here’s the upgrade I’m looking for (from Cnet, scroll towards the bottom re: versions): http://home.cnet.com/software/0-3923203-7-290680.html
[indent]
How to Get It
If you decide that this flotilla of features is worth your while and your wallet, here’s how to get Second Edition:- If you already run Windows 98, order the $19.95 update from Microsoft’s site. (This is the one I’m looking for.)
- Windows 3.x and Windows 95 users can buy the upgrade on CD ($109 suggested retail price). Find lowest prices here.
- Purchase the complete Windows 98 Second Edition operating system on CD through normal retail channels. Find lowest prices here.
- Automatic Windows Update
Want to improve your Windows 98 system but don’t want to pay for Second Edition? Browse on over to Microsoft’s Windows Update site. (This is the option I originally chose.)[/list]
[/indent]
The link in the Cnet article for the $19.95 upgrade now goes to ME, which is, of course, a much more expensive upgrade, not to mention that I don’t want to do it (see previous post). I do intend to follow your advice re: XP ;-). In the meantime, any leads on that $19.95 upgrade would be totally appreciated!!!Thanks,
Cecilia 🙂
-
WSCecilia
AskWoody LoungerHi Karen–
Thanks so much for this! What a cool idea!
(Sorry for the VERY slow response…Could be indicative of a gov’t agency, but the truth is I was away for a few months, and of course, no one missed the fix to the problem. Oh, well.)
Cecilia 🙂
-
WSCecilia
AskWoody LoungerLOLOL Yes, my powers are the government, and as you must know, whether they’re right or wrong, my powers are always right, unyielding and unbending. Grrrrr.
I think you had my question right from the start. Now I’m thinking I didn’t explain enough. The template in question is a protected “form”: And because it’s protected, I had to write the code to spell check, and another code to update the headers (which are bookmarks of the first page–And this is a whole other story regarding TPTB’s decisions and how I can’t set their settings to Update Fields at Print, kinda comical, too ;-). Traditionally, they store these Word 97 documents on the intranet server as documents. So when people download them to use them, the code associated with the original template isn’t there, then they can’t spell check or update headers. (And I’ve tried like heck to come up with an un-protected version of the form, but no luck.)
So, what I need is a way to store the template on the web server and when the user clicks on it, it opens as a document with the programming intact.
But now that I’ve written all this out and I’m thinking about it, it might not work at all because once they’re separate from the web server, the document would again be separated from the code in the template.
Uggggh. But thanks for listening, anyway 😉
![]() |
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
-
Bipartisan Effort to Sunset the ‘26 Words That Created the Internet’..
by
Alex5723
3 hours, 32 minutes ago -
Outlook new and edge do not load
by
cHJARLES a pECKHAM
15 hours, 28 minutes ago -
Problem using exfat drives for backup
by
Danmc
15 hours, 46 minutes ago -
I hate that AI is on every computer we have!
by
1bumthumb
17 hours, 4 minutes ago -
Change Info in the Settings window
by
CWBillow
22 hours, 27 minutes ago -
Attestation readiness verifier for TPM reliability
by
Alex5723
1 day, 4 hours ago -
Windows Update says that “some settings are managed b your organization”
by
Ed Willers
14 hours, 35 minutes ago -
Use of Gmail rejected.
by
CBFPD-Chief115
15 hours, 15 minutes ago -
WuMgr operational questions
by
Tex265
15 hours, 54 minutes ago -
Beijing’s unprecedented half-marathon: Humans vs. humanoids!
by
Alex5723
1 day, 20 hours ago -
New Phishing Campaign Targeted at Mac Users
by
Alex5723
20 hours, 38 minutes ago -
Backing up Google Calendar
by
CWBillow
2 days, 2 hours ago -
Windows 11 Insider Preview build 27818 released to Canary
by
joep517
2 days, 15 hours ago -
File Naming Conventions (including Folders)
by
Magic66
1 day, 14 hours ago -
Windows 11 Insider Preview Build 26100.3613 (24H2) released to Release Preview
by
joep517
2 days, 22 hours ago -
Microsoft sends emails to Windows 10 users about EOS
by
Alex5723
2 days, 9 hours ago -
Outlook 2024 importing Calendar and Contacts – FAILURE
by
Kathy Stevens
1 day, 15 hours ago -
Adding Microsoft Account.
by
DaveBRenn
3 days ago -
Windows 11 Insider Preview build 26120.3576 released to DEV and BETA
by
joep517
3 days, 23 hours ago -
Windows 11 Insider Preview Build 22635.5090 (23H2) released to BETA
by
joep517
3 days, 23 hours ago -
Windows 11 won’t boot
by
goducks25
1 day, 16 hours ago -
Choosing virtual machine product for Windows on Mac
by
peterb
3 days, 13 hours ago -
Rest in Peace
by
Roy Lasris
4 days, 18 hours ago -
CISA : Install Windows March 2025 Updates until April 1 or shut down PC.
by
Alex5723
1 day, 15 hours ago -
Google proposes users with incompatible Win 11 PCs to migrate to ChromeOS Flex
by
Alex5723
4 days, 18 hours ago -
Drivers for Epson Perfection V600 Photo – scanner
by
Bookman
1 day, 10 hours ago -
Long Time Member
by
jackpet
4 days, 21 hours ago -
Woody Leonhard (1951–2025)
by
Will Fastie
15 hours, 15 minutes ago -
What I learned from Woody Leonhard
by
B. Livingston
4 days, 14 hours ago -
Windows Settings today
by
Simon Bisson
17 hours, 5 minutes 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.