-
WSchico
AskWoody LoungerMarch 31, 2004 at 7:51 pm in reply to: Calculating number of days between dates (Access 2000) #807793I’m not sure about Access2K, but it *should* work like A97. Try this:
datediff(“d”,startdate,enddate) for days
datediff(“w”,startdate,enddate) for weekdays (m-f)
-
WSchico
AskWoody LoungerMarch 31, 2004 at 7:51 pm in reply to: Calculating number of days between dates (Access 2000) #807794I’m not sure about Access2K, but it *should* work like A97. Try this:
datediff(“d”,startdate,enddate) for days
datediff(“w”,startdate,enddate) for weekdays (m-f)
-
WSchico
AskWoody LoungerHans,
It works like a charm. The names in the tblMaster did have the file extensions, but I just concatenated the string returned and it was fine.
That’s pretty good to get that close with air code! I just keep learning more and more!Thanks Again!
-
WSchico
AskWoody LoungerThanks, Hans!
The code seems to work ok except that it looks for the wrong file. For example, it returns a message saying that it can’t find C:My Documents”theClientFile”.mdb. The “theClientFile” part is the correct name of the dbf file I want, but it obviously is not an mdb and is not in My Documents. I could very well copy the dbf’s to My Docs but they would still not be mdb’s, so it would seem to defeat the purpose.
As sort of a troubleshooting measure, I tried to create an append query, filling in actual values for the variables and leaving in the ” IN ‘G:dbf_files’ ‘FoxPro;'” line. I get an error that says “Couldn’t find an installable ISAM.” I don’t know what that means, but it doesn’t sound good. I don’t know which version of FoxPro these dbf’s are. I have Visual FoxPro 7 installed and it opens them with no trouble. In the Access97 Help file for TableDef.Connect, it only lists up to version 2.6 of FoxPro. Could that be part of my problem? I’ve never constructed an “Insert into” SQL string from an external source, so I’m lost.
-
WSchico
AskWoody LoungerThanks Wendell, I’ll give those a try. I tried to recreate the error in a different db but couldn’t. The thing is, this db could have been chewed up to begin with. I didn’t develop it, I’ve just been fixing it.
———————-SoapBox
We all know what a pain it is to try and fix something created by someone who knows very little about Access and nothing about VB. Not that there’s anything wrong with either of those. We all have to start somewhere, right?
————————End SoapBoxAnyhoo, I may end up just re-doing the whole thing since I’ve practically had to do that anyway.
Just out of curiosity, what is the difference between the stand-alone compact and repair vs. the built-in one?
-
WSchico
AskWoody LoungerFebruary 3, 2003 at 6:22 pm in reply to: Send message w/ different versions of Outlook (Acc97 SR2) #650085Charlotte,
The IMO is coming back to me now. I guess you could say that all our machines run IMO, since we only use Internet mail.Claus,
I’ll take another look at your code sample as time permits.Thanks Again
-
WSchico
AskWoody LoungerJanuary 31, 2003 at 6:36 pm in reply to: Send message w/ different versions of Outlook (Acc97 SR2) #649589Hi all and thanks for the replies.
First of all, for John:
I don’t know what a WAW is. Is that some public reference or just a newsletter that comes complete with a secret handshake, or what? I’m actually not using the higher versions of Access to open the db. I’m using A97 to open it on all machines. The problem is that they have the different versions of Outlook. I did, however, un-check the references and it seems OK, but I don’t think that the XP user has had to use it since (it’s been about a week).For Charlotte:
Yes, this is in fact on a shared folder. I had considered making different front ends, but there are a couple of issues with that. One, I didn’t want to have to update it 3 times every time something changed. Two, there is a coded autonumber-type field that issues a calculated number (it’s a PO request db). So it looks at the highest number in the number part of the field and adds one to it. I don’t know how to fix it so that more than one person can use it at a time. Therefore, I have a batch file that checks to see if there is a corresponding ldb file, and either returns a message saying that the db is unavailable, or opens it. If I split the db, it seems like it would be harder to pull that off.
IMO is another acronym I’m not familiar with. How does Outlook run “IMO”?For Claus:
What are the # signs for? I’ve never seen that before. I’ll have a closer look at your code sample and see if I understand it well enough to give it a try. I can see right off that I don’t know what you’re talking about by setting Development=True or False. I do appreciate the code sample just the same as well as the tip about the object browser. I’ll have to play with that and see what I can find. -
WSchico
AskWoody LoungerSure.
Say you have a combo box (cboComboBox) with a list of numbers. You could set the AfterUpdate event to be something like:List1.RowSource=”Select Field1, field2,field3 from YourTable where field1=” & cboComboBox & “;”
List1.RequeryThen, for a command button (cmdOrderBy2), you could set the OnClick to something like
List1.RowSource=Left(List1.rowsource,Len(list1.rowsource)-1) & ” Order By field2;”
List1.requeryThis (I think) would sort the list by field2 instead of field1.
The Left(…Len…)) is just there to take the semicolon off the end before appending the Order By
This is a pretty crude code example, but I’m just doing it off the top of my head. If you need something a bit more detailed, please let me know. Or give it a few minutes…I’m sure someone else will post something better. That’s what usually happens.
-
WSchico
AskWoody LoungerThe sad part is that I meant to put the REQUERY in the post and just didn’t for some reason or other.
-
WSchico
AskWoody LoungerHi Amanda,
Just a thought, but couldn’t you use the AfterUpdate event of the “dropdowns” (I’m assuming combobox) along with the command buttons to dynamically set the RowSource for the list? For example you could have one dropdown set the RowSource of your listbox to an SQL statement and leave out any sort. Just make a “default” sort field the first field in the SQL. Then with each command button, you could add an “ORDER BY” and append it to the end of the existing SQL. -
WSchico
AskWoody LoungerHans,
Thanks for the reply. I saw the date of Thomas’s post after I’d already sent mine, but figured it was worth a shot. Your post cleared it up somewhat, but I’m still a little confused. Here’s my situation.I have several reports in my db that need to go to corporate each month. Currently, the user just prints them from Access (97 SR2) and faxes them, but it’s getting to be too much paper. I tried exporting to snapshot and sending via e-mail, but these reports have graphs in them and snapshot doesn’t like them. So I downloaded a program called PDF2Mail which uses GhostScript and RedMon to generate a PDF file. I don’t know how to change the name of the pdf file created so that the user doesn’t have to go through the process of renaming each file (there are about 6). I’d like to be able to generate the pdf file name based on parameters that are entered to generate the report.
-
WSchico
AskWoody LoungerThomas,
Could you post more specific code? -
WSchico
AskWoody LoungerThis is a known issue with a graphic. It’s a jpg and snapshot doesn’t like them. I found the KB article about it right after I created the post. You can find it here: http://support.microsoft.com/default.aspx?…b;en-us;Q187341%5B/url%5D.
Guess I got a little impatient there. -
WSchico
AskWoody LoungerWOW! That is EXACTLY what I need. Thanks!
P.S.
Teach me Obi-Wan. I have much to learn of the VB force. -
WSchico
AskWoody LoungerThanks for the ideas. Charlotte’s example gives me exactly what I want for 1 group of checkboxes. I need to be able to check chk1 and have it clear the others. Also, as soon as one of the others is checked, chk1 is cleared. However, is it possible to set up arrays on the same form so that I can put “clones” of chk1 on the same form? What I am looking for is something like:
…
For each ctl in MyArray
if control name name of first checkbox in Myarray then
ctl.value=False
…I could even set MyArray=1 to 5, MyArray2 = 6 to 10, etc. (Just a thought)
This way, I could use (essentially) the same code for boxes 1-5, 6-10, 11-15, etc with boxes 1-5 working exactly as Charlotte’s example with chk1 being the “all clear” box, chk6 would be the “all clear” for 7-10, and so on. I have looked at the help files on arrays, but I just don’t get how to set up an array of objects like checkboxes. Am I spitting in the wind, here?
Of course, if there’s a better way to do it, I’m open to that, too. Just seems to me like an array type activity would get the job done. Any other suggestions are definitely welcome.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
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
-
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
3 hours, 26 minutes ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
3 hours, 52 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
14 hours, 47 minutes ago -
How much I spent on the Mac mini
by
Will Fastie
4 hours, 14 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
6 hours, 35 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
20 hours, 39 minutes ago -
Setting up Windows 11
by
Susan Bradley
4 hours, 15 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
16 hours, 7 minutes ago -
Powershell version?
by
CWBillow
17 hours ago -
SendTom Toys
by
CWBillow
1 hour, 16 minutes ago -
Add shortcut to taskbar?
by
CWBillow
20 hours, 55 minutes ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
1 day, 13 hours ago -
How can I install Skype on Windows 7?
by
Help
1 day, 12 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
18 hours, 55 minutes ago -
We live in a simulation
by
Alex5723
2 days, 3 hours ago -
Netplwiz not working
by
RetiredGeek
1 day, 14 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
2 days, 15 hours ago -
Microsoft is killing Authenticator
by
Alex5723
1 day, 3 hours ago -
Downloads folder location
by
CWBillow
2 days, 22 hours ago -
Remove a User from Login screen
by
CWBillow
1 day, 17 hours ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
2 days, 13 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
2 days, 13 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
15 hours, 34 minutes ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
2 days, 12 hours ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
1 day, 12 hours ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
3 days, 2 hours ago -
Multiple Partitions?
by
CWBillow
3 days, 2 hours ago -
World Passkey Day 2025
by
Alex5723
49 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
4 days, 11 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
2 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.