-
WSJim Bulger
AskWoody Loungeror he could pass the teacherid in the openargs parameter
-
WSJim Bulger
AskWoody LoungerI was trying to hold out on you, but….
FileCopy varOriginationMDB, varDestinationMDB
or
FileCopy varOriginationMDB, varDestinationLocation & “” & format(“yyyy-dd-mm”,Date()) & “.mdb”
both should work
Good luck
-
WSJim Bulger
AskWoody LoungerJust because it is networked is no reason for concern. What is of concern is how everyone access it. Is the db split into front-end/back-end or is everyone using the SAME .mdb? Exactly what is being corrupted?
-
WSJim Bulger
AskWoody LoungerThe easiest would be, (in access) run a shell command such as the following:
Shell “c:program fileswinzipwinzip32.exe -min -a ” & fullPathAndFilenameToCreate & ” ” & fullPathAndFilenameToZip
which would create a.zip file containing the .mdb and name it whatever name you assign to the fullPathAndFilenameToCreate variable
This assumes you have a liscenced copy of winzip in the difined location -
WSJim Bulger
AskWoody LoungerJust a thought.
Just prior to the Application.Quit, (using code, of course) open up another .mdb file which would contain the copydb code. You can then fire the code in the open event of the startup form (or autoexec macro, if you must). Be sure to check for the abscence of the matching .ldb to ensure noone else is using the mdb (thereby possibly losing data among other problems)
-
WSJim Bulger
AskWoody LoungerThis may work well as you say, but this code realy belongs behind the form and not in a separate module. The reasoning behind my statement is that you are explicitly saying that only the form “fProjectInfo” can ever be used. If you pass the VALUE of Forms!fProjectInfo!cboPM.Column(0) in your function call, then it would be useful for more than just one form.
Public Function Open_Log(obj As Object, strEmail as string)
Dim db As Database
Dim rsLog As RecordsetSet db = CurrentDb()
Set rsLog = db.OpenRecordset(“tReortLog”)
With rsLog
.AddNew
.Fields(“WhatReport”) = obj.Name ‘or whatever your field name is
.Fields(“PM”) = strEmail
.Update
.Close
End With
Set rsLog = Nothing
Set db = Nothing
End Function -
WSJim Bulger
AskWoody Loungersince the report specified is held in a variable, try something like this:
.fields(“PM”)=reports(obj).PM
(although this will only work if every report passed has the same object (i.e. “PM”) on it)
a better alternative would be to pass two parameters to the function. The report name and the object name
-
WSJim Bulger
AskWoody LoungerAll I would end up doing is giving away their code which is pretty unethical. their code is free to use as long as you purchase their book or find it published in one of their many articles in periodicals or on the web. Sorry, but maybe someone else wrote a custom module they will post for you
-
WSJim Bulger
AskWoody LoungerIf you have the Acees Developers Handbook by Gilbert, Getz & Litwin, you would already have that. If you don’t have the book, I would HIGHLY recommend purchasing it.
-
WSJim Bulger
AskWoody LoungerWhat do you mean by ‘set the ‘Source’ property of an existing form to an arbitrary value’? Are you referring to the RECORDSOURCE?
-
WSJim Bulger
AskWoody Loungerassuming you are using code to connet the table links, try using an if statement such as:
IF table.name like ‘MDATAP*’ then
‘**place your connection code here
END IF -
WSJim Bulger
AskWoody Loungerdocmd.setwarnings false
DoCmd.RunSQL “INSERT INTO PersonalAdvices (xxx, yyy, zzz) VALUES (xxx, yyy, zzz)” , A_NEWREC
docmd.setwarnings true -
WSJim Bulger
AskWoody Loungerpaste the followinig into a new module. It does exactly what you are looking for
Option Compare Database
Option Explicit‘************** Code Start **************
‘This code was originally written by Terry Kreft.
‘It is not to be altered or distributed,
‘except as part of an application.
‘You are free to use it in any application,
‘provided the copyright notice is left unchanged.
‘
‘Code courtesy of
‘Terry KreftPrivate Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End TypePrivate Declare Function SHGetPathFromIDList Lib “shell32.dll” Alias _
“SHGetPathFromIDListA” (ByVal pidl As Long, _
ByVal pszPath As String) As LongPrivate Declare Function SHBrowseForFolder Lib “shell32.dll” Alias _
“SHBrowseForFolderA” (lpBrowseInfo As BROWSEINFO) _
As LongPrivate Const BIF_RETURNONLYFSDIRS = &H1
Public Function BrowseFolder(szDialogTitle As String) As String
Dim X As Long, bi As BROWSEINFO, dwIList As Long
Dim szPath As String, wPos As IntegerWith bi
.hOwner = hWndAccessApp
.lpszTitle = szDialogTitle
.ulFlags = BIF_RETURNONLYFSDIRS
End WithdwIList = SHBrowseForFolder(bi)
szPath = Space$(512)
X = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)If X Then
wPos = InStr(szPath, Chr(0))
BrowseFolder = Left$(szPath, wPos – 1)
Else
BrowseFolder = “”
End If
End Function -
WSJim Bulger
AskWoody LoungerExactly which step in your code is breaking? Have you set breakpoints and stepped though it? This will help you answer most of your questions.
-
WSJim Bulger
AskWoody Loungeryou’re right. forgot.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
Discover the Best AI Tools for Everything
by
Alex5723
8 hours, 4 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
2 hours, 50 minutes ago -
Rufus is available from the MSFT Store
by
PL1
19 hours, 2 minutes ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
21 hours, 11 minutes ago -
KB5061768 update for Intel vPro processor
by
drmark
3 hours, 36 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
19 hours, 22 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
16 hours, 57 minutes ago -
Office gets current release
by
Susan Bradley
19 hours, 34 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
2 days, 9 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
1 day, 18 hours ago -
Stop the OneDrive defaults
by
CWBillow
2 days, 10 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
2 days, 20 hours ago -
X Suspends Encrypted DMs
by
Alex5723
2 days, 22 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
2 days, 22 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
2 days, 23 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
3 days ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
2 days, 12 hours ago -
Enabling Secureboot
by
ITguy
2 days, 19 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
3 days, 8 hours ago -
No more rounded corners??
by
CWBillow
3 days, 3 hours ago -
Android 15 and IPV6
by
Win7and10
2 days, 17 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
3 days, 20 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
3 days, 23 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
3 days, 17 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
4 days, 6 hours ago -
May preview updates
by
Susan Bradley
3 days, 17 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 days, 9 hours ago -
Just got this pop-up page while browsing
by
Alex5723
3 days, 22 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
3 days, 19 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
2 days, 21 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
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.