-
WSready4data
AskWoody LoungerMarch 18, 2002 at 1:29 pm in reply to: Need ideas for creating a running sum table (Access97/2000) #576890Charlotte,
The data will be for 12,000 units plus.
I didn’t really want to have a table that big, but I will give it some thought.
Any other ideas welcome
Thanks, and thanks Francois -
WSready4data
AskWoody LoungerRoberta,
Here is a small sample DB that has the open dialog API example for you. -
WSready4data
AskWoody LoungerMarch 18, 2002 at 12:28 pm in reply to: Need ideas for creating a running sum table (Access97/2000) #576870Mark,
How would that show a 6 month total(sum) for each machine?
It seems to me that I would somehow have to keep 6 months of readings for each machine in the table and then delete the earliest reading when the next month rolls around(once I get at least 7 months worth of data)
But not sure how to do this.
Thanks,
Scott -
WSready4data
AskWoody LoungerMy 2 cents worth
In control panel under regional settings make sure your short date format is set to MM/dd/yyyy
I had some date issues when the setting was at the default which I think was M/d/yy -
WSready4data
AskWoody LoungerHere is a routine that opens your forms and centers them on the screen.
Place this in the declarations section of a module
Global g_ScreenWidth As Integer ‘ Screen width for CenterForm sub
Global g_ScreenHeight As Integer ‘ Screen height for CenterForm subHere is the function:
Sub CenterForm(p_Width As Integer, p_Height As Integer)
‘ Arguments are in twips where 1 inch = 1440 twips
‘ If form has title bar, add 240 twips to height argument
‘
‘ Resolution Dimensions Title Bar, Menu Bar, and Tool Bar):
‘
‘ Resolution ScreenWidth ScreenHeight
‘ 640×480 9600 5720
‘ 600×800 12000 7400Dim ScreenWidth As Integer
Dim ScreenHeight As Integer
Dim VertPos As Integer
Dim HorPos As Integer‘ Set ScreenWidth & ScreenHeight according to resolution (see table above)
ScreenWidth = 12000
ScreenHeight = 7400If p_Height > ScreenHeight Then
VertPos = 0
Else
VertPos = (ScreenHeight – p_Height) / 2
End IfIf p_Width > ScreenWidth Then
HorPos = 0
Else
HorPos = (ScreenWidth – p_Width) / 2
End IfDoCmd.MoveSize HorPos, VertPos, p_Width, p_Height
End Sub
Then in the OnOpen Event of the form use
CenterForm 2880, 2880 ‘If your form was 2″ x 2″ -
WSready4data
AskWoody LoungerWhy not just put the form in the startup options.
Click Tools.. then startup .. then enter the form name -
WSready4data
AskWoody LoungerThank you that did the trick
-
WSready4data
AskWoody LoungerHi,
The column names are different manufacturing companies
the rows are their model numbers for the item
Each company has its own model number even though the item is the same
eg. sorry doesn’t format properly
company1 company2 company3 company4
tl32c ft2343 2345 widget1
rd4565 pp1221 rr45 344r
I want to be able to lookup say “widget1” and have the db return that whole row so the user
can see what the equivilent models are
Hope this helps -
WSready4data
AskWoody LoungerI found out what the problem was
ObjectType in the TransferDatabase method needed to be a number, not a string (acModule,acForm…)
I used a Select Case statement to provide the numbersDim strSQL As String
Dim rs As Recordset
Dim db As Database
Dim dbs As Database
Dim rst As Recordset
Dim targetws As Workspace
Dim targetdb As Database
Dim strNME As String
Dim strTYPE As String””DELETES ALL EXISTING OBJECTS EXCEPT TABLES
Set db = CurrentDb
strSQL = “SELECT MsysObjects.Name,
IIf([TYPE]=-32768,’acForm’,IIf([TYPE]=-32766,’acMacro’,IIf([TYPE]=-32764,’acReport’,IIf([TYPE]=5,’acQuery’,IIf([TYPE]=-32761,’acModule’)))))
” & _
“AS Expr1, MsysObjects.Type FROM MsysObjects WHERE (((MsysObjects.Name)’frmUPGRADE’) AND ((MsysObjects.Type)1 And
(MsysObjects.Type)2 And (MsysObjects.Type)3 And (MsysObjects.Type)6 And (MsysObjects.Type)-32757) AND
((Left$([Name],1))’~’)) ” & _
“ORDER BY MsysObjects.Name;”Set rs = db.OpenRecordset(strSQL)
rs.MoveFirst
Do While Not rs.EOF
Select Case rs(1)
Case “acMacro”
DoCmd.DeleteObject acMacro, rs(0)
Case “acForm”
DoCmd.DeleteObject acForm, rs(0)
Case “acQuery”
DoCmd.DeleteObject acQuery, rs(0)
Case “acReport”
DoCmd.DeleteObject acReport, rs(0)
Case “acModule”
DoCmd.DeleteObject acModule, rs(0)
End Select
rs.MoveNext
Loop
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, “tblVERSION”
DoCmd.SetWarnings True””IMPORTES NEW OBJECTS FROM MODIFIED DB
Set targetws = DBEngine.Workspaces(0)
Set targetdb = targetws.OpenDatabase(“c:reliability_upgrade.mdb”)
Set dbs = targetdb ‘REFERENCE TO THE EXTERNAL DBstrSQL = “SELECT MsysObjects.Name, IIf([TYPE]=-32768,’acForm’,IIf([TYPE]=-32766,’acMacro’, ” & _
“IIf([TYPE]=-32764,’acReport’,IIf([TYPE]=5,’acQuery’,IIf([TYPE]=-32761,’acModule’, ” & _
“IIf([TYPE]=1,’acTable’)))))) AS OBJ, MsysObjects.Type ” & _
“FROM MSYSOBJECTS ” & _
“WHERE (((MsysObjects.Name) Not Like ‘msys*’ And (MsysObjects.Name)’FRMUPDATE’) AND ” & _
“((MsysObjects.Type)2 And (MsysObjects.Type)3 And (MsysObjects.Type)6 And ” & _
“(MsysObjects.Type)-32757) AND ((Left$([Name],1))’~’)) ” & _
“ORDER BY MsysObjects.Name;”Set rst = dbs.OpenRecordset(strSQL) ‘IDENTIFIES ALL OBJECTS IN THE EXTERNAL DB TO IMPORT
Do Until rst.EOF
Select Case rst!OBJ ‘SUPPLIES THE VALUE OF OBJECTTYPE AS A NUMBER
Case “acForm”
strTYPE = 2
Case “acMacro”
strTYPE = 4
Case “acModule”
strTYPE = 5
Case “acQuery”
strTYPE = 1
Case “acReport”
strTYPE = 3
Case “acTABLE”
strTYPE = 0
End Select
strNME = rst!NAME
DoCmd.TransferDatabase acImport, “MICROSOFT ACCESS”, “C:RELIABILITY_UPGRADE.MDB”, strTYPE, strNME, strNME
rst.MoveNext
Loop
targetdb.Close
MsgBox “Done”
Kill “c:reliability_upgrade.mdb” ‘DELETE EXTERNAL DB
![]() |
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
-
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
54 minutes ago -
Creating an Index in Word 365
by
CWBillow
1 hour ago -
Coming at Word 365 and Table of Contents
by
CWBillow
1 hour, 5 minutes ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
6 hours, 1 minute ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
9 hours, 27 minutes ago -
W11 24H2 – Susan Bradley
by
G Pickerell
11 hours, 22 minutes ago -
7 tips to get the most out of Windows 11
by
Alex5723
9 hours, 23 minutes ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
2 hours, 45 minutes ago -
I installed Windows 11 24H2
by
Will Fastie
1 hour, 4 minutes ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
14 hours, 49 minutes ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
1 hour, 46 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
23 hours, 4 minutes ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
7 hours, 17 minutes ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
7 hours, 31 minutes ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
1 day, 16 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
2 days ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
1 day, 2 hours ago -
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
1 day, 9 hours ago -
Is data that is in OneDrive also taking up space on my computer?
by
WShollis1818
1 day, 19 hours ago -
Nvidia just fixed an AMD Linux bug
by
Alex5723
3 days, 11 hours ago -
50 years and counting
by
Susan Bradley
9 hours, 41 minutes ago -
Fix Bluetooth Device Failed to Delete in Windows Settings
by
Drcard:))
12 hours, 30 minutes ago -
Licensing and pricing updates for on-premises server products coming July 2025
by
Alex5723
3 days, 22 hours ago -
Edge : Deprecating window.external.getHostEnvironmentValue()
by
Alex5723
3 days, 22 hours ago -
Rethinking Extension Data Consent: Clarity, Consistency, and Control
by
Alex5723
3 days, 22 hours ago -
OneNote and MS Word 365
by
CWBillow
4 days ago -
Ultimate Mac Buyers Guide 2025: Which Mac is Right For You?
by
Alex5723
4 days ago -
Intel Unison support ends on Windows 11 in June
by
Alex5723
4 days ago -
April 2025 — still issues with AMD + 24H2
by
Kevin Jones
1 day, 16 hours ago -
Windows 11 Insider Preview build 26200.5518 released to DEV
by
joep517
4 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.