-
WSJulesG
AskWoody LoungerHi!
You might be best moving this question to the Outlook forum. It sounds as if MS Access has worked correctly, but a security setting within Outlook is stopping the mesage from being sent. There’s probably a way to change the setting, but I’m no Outlook expert and others would need to advise.
There could also be a way to force use of a specific profile from the SendObject command, but if so, I’m not familiar with it.
Regards,
-
WSJulesG
AskWoody LoungerBaiju,
this is a simple one. You just need to change the range and the reference to the cell holding the criteria. You need: =COUNTIF($A$9:$A$16,$A2).
Since you have a value (OPS) repeated in your criteria, be careful you don’t simply total up the results!
Regards,
-
WSJulesG
AskWoody LoungerAndy,
Glad to be of help.
-
WSJulesG
AskWoody LoungerLuke,
I haven’t got a direct answer immediately, but can offer an alternative approach. What about adding the date and time to the filename, e.g.
strFilename = “myfile ” & Format(Now(), “yyyy-mm-dd”) & ” ” & Format(Now(), “hhmmss”) & “.xls”
DoCmd.OutputTo acOutputQuery, “qryMyQueryName”, acFormatXLS, strFilename, True
This makes every file name unique.Just a thought.
-
WSJulesG
AskWoody LoungerHi! Don’t know if this is any help. I prepared it a couple of years ago, and haven’t looked at it since. Still, it might give you some ideas. Look at frmHelpExplanation to start.
-
WSJulesG
AskWoody LoungerAndy,
could this be as simple as the database not being in the default Access folder? If so, you’ll need to add the path before the filename, e.g. “D:myfolderfilename,mdb”.
Worth a try.
-
WSJulesG
AskWoody LoungerHi!
You need to add a Where clause to your SQL statement
Set RSD1 = DB1.OpenRecordset(“SELECT COUNT(*) FROM ANAGRAFICA1 WHERE ([insert your field name here] LIKE “65*”))
or you could use SELECT COUNT(*) FROM ANAGRAFICA1 WHERE (Left([insert your field name here],2) = “65”))
Try it in the query grid first, by creating your totals query with its Count function, then dragging the data field down to the grid and adding the criteria to this field as a ‘Where’. If the field is numeric, change the criteria accordingly.
Don’t forget to check for EOF or use NZ() around the recordset result, or the code will fall over.
Have fun!
-
WSJulesG
AskWoody LoungerDeekatz,
you haven’t actually said if Hans’ suggestion was any help. Instead, you’ve launched into a second question. Sticking to your first question, if the KB article didn’t cover your situation, more information is needed. I use Access and SQL Server 2000 together all the time, and there’s normally an explanation for such symptoms (quite often the two queries are actually slightly different, or dates are not being formatted correctly, or nulls are handled differently). If you’d like to post the SQL that you are using, I’ll see if I can come up with any ideas.
-
WSJulesG
AskWoody LoungerMichelle,
the only way I know to handle this is to create a new table. Copy the structure of your table, change the name of the original (for later deletion), then give the new table the correct name. Or, change the name of the original, then copy the structure to a new table with the original name. Don’t forget to check that all indexes have also transferred to the new table.
-
WSJulesG
AskWoody LoungerRemember that if you have a header row (as seems extremely likely), then the row with the problem may be 246 not 245. I’ve also known Excel to be misleading with these row numbers, and the problem could be a few above or below the stated row.
Jerry mentioned char(10) and char(13). The ascii character set includes characters that are not always visible on screen, such as carriage returns and, obviously, spaces. For more information, try the help file or Microsoft’s KnowledgeBase.
I’ll make this my last reply to this post, I don’t think there’s anything useful I can add. Keep trying, there’s always a solution, always something new to learn.
-
WSJulesG
AskWoody LoungerHi again!
The error is possibly on row 243 of the spreadsheet, athough this is approximate. You must have a whole lot of columns in your spreadsheet to get 215 as the error column. Possibly there are cells in the spreadsheet that once held data, but it has now been deleted. Excel and Access often have a dispute over the content of these cells. I suggest you try copying your data into a nice new workbook, only copying those columns and rows that have visible data that you want to keep, and try the import again.
-
WSJulesG
AskWoody LoungerSorry, no simple example. I’ve stripped out some redundant comments from the code in the attached file (and changed table names). Try following the code using my previous post as a guide. Think of it as a useful learning exercise!
JulesG
-
WSJulesG
AskWoody LoungerYou are fighting against MS Access’ normal way of working. You may even need to look at your data structure to see if it is optimum for your system – if the data will not easily come out in the format you require, there may be something fundamentally wrong with how the data is being stored.
Putting that aside, here’s how I would approach the problem.
I like to use arrays when concatenating data; it makes the data easier to handle. For the current task, a single-dimension array is probably appropriate.
I don
-
WSJulesG
AskWoody LoungerI can’t think of a way to do this in a query without getting very complicated using two recordsets from the same table. You could try grouping options and a calculated field that concatenates both values, setting a criteria of circuit field = 1 to avoid duplicates, but this only works if you will never have a circuit field value of 2 without a corresponding 1.
However, If I was approaching this problem, I’d use some code to run through the records, concatenating data where appropriate, and outputting the data to a temporary table.
Just some thoughts,
-
WSJulesG
AskWoody LoungerHans has provided excellent advice, but from the lack of response, I suspect that it’s not what you wanted to hear.
Since you cannot click on an invisible control, I assume that you are controlling visible/invisible from elsewhere, an option group or a series of buttons. Why not write a simple function that makes all the list boxes invisible, and then makes the required list box visible. For example, SetVisible(“controlname”):Function SetVisible(ctlName as String)
listbox1.Visible = False
listbox2.Visible = FalsectlName.Visible = True
End Function
There are neater ways, this is simple. Hans’ solution is better.
![]() |
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
-
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
6 hours, 40 minutes ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
2 hours, 24 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
5 hours, 14 minutes ago -
Discover the Best AI Tools for Everything
by
Alex5723
5 hours, 23 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
6 hours, 6 minutes ago -
Rufus is available from the MSFT Store
by
PL1
3 hours, 35 minutes ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
1 day, 6 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
12 hours, 50 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
9 hours, 1 minute ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
1 day, 2 hours ago -
Office gets current release
by
Susan Bradley
1 day, 4 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
2 days, 18 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
2 days, 3 hours ago -
Stop the OneDrive defaults
by
CWBillow
2 days, 19 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
3 days, 5 hours ago -
X Suspends Encrypted DMs
by
Alex5723
3 days, 7 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
3 days, 8 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
3 days, 8 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
3 days, 9 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
2 days, 21 hours ago -
Enabling Secureboot
by
ITguy
3 days, 4 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
3 days, 17 hours ago -
No more rounded corners??
by
CWBillow
3 days, 13 hours ago -
Android 15 and IPV6
by
Win7and10
3 days, 2 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
4 days, 5 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
4 days, 8 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
4 days, 2 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
4 days, 15 hours ago -
May preview updates
by
Susan Bradley
4 days, 3 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 days, 18 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.