-
WSStewart
AskWoody Lounger(Edited by HansV to make URLs clickable – see Help 19)
have a look at these replacement functions for the Dlookup and other domain aggregate functions.
I have not used them but they may help.
http://easyweb.easynet.co.uk/~trevor/AccFA…ules.htm#doamin%5B/url%5D
also some tips to make access faster can be found at
-
WSStewart
AskWoody LoungerHans,
The source agency are using Office 2k and we are currently negotiating with them to replace their template with a new clean one.
It is interesting that you had different results with the macro security settings. I tried high medium and low and all 3 crashed the document to a greater or lesser degree. The best result was getting the document open and being able to print it.
Thanks for the help.
Stewart
-
WSStewart
AskWoody LoungerHans,
The source agency are using Office 2k and we are currently negotiating with them to replace their template with a new clean one.
It is interesting that you had different results with the macro security settings. I tried high medium and low and all 3 crashed the document to a greater or lesser degree. The best result was getting the document open and being able to print it.
Thanks for the help.
Stewart
-
WSStewart
AskWoody LoungerJefferson,
Thanks for the tip on the “Recover Text from Any File (*.*)” filter. It did make for interesting viewing. I’m not sure of the history of the template that the document is created from but we are in the process of trying to resolve this.
Thnaks for taking the time to look at my problem.
Stewart
-
WSStewart
AskWoody LoungerJefferson,
Thanks for the tip on the “Recover Text from Any File (*.*)” filter. It did make for interesting viewing. I’m not sure of the history of the template that the document is created from but we are in the process of trying to resolve this.
Thnaks for taking the time to look at my problem.
Stewart
-
WSStewart
AskWoody LoungerAndrew,
It’s not my document I’m just trying to get the user going again
. As to crashing Open Office, well there is always a first time I guess but I’m sure that I could live without the honor.
To be honest I don’t care about the Macros, the user can print the documents and do whatever else she then needs to do with the information but as she receives numerous documents every day I was looking to reduce the pain factor for her.
We are negotiating with the source agency to recreate their template(s) and solve our problem.
Thanks for your help.
Stewart
-
WSStewart
AskWoody LoungerAndrew,
It’s not my document I’m just trying to get the user going again
. As to crashing Open Office, well there is always a first time I guess but I’m sure that I could live without the honor.
To be honest I don’t care about the Macros, the user can print the documents and do whatever else she then needs to do with the information but as she receives numerous documents every day I was looking to reduce the pain factor for her.
We are negotiating with the source agency to recreate their template(s) and solve our problem.
Thanks for your help.
Stewart
-
WSStewart
AskWoody Loungerhere is a nice real world example
http://groups.google.com.au/groups?dq=&…s&start=100
I changed the url and tested it and it worked for me but failing that the main parts are as follows.
Problem
I have a list of 50,000 records of which two records need
to be removed. The olny thing I know about the two is that
their sum = 1160.09. How can I get Access to evaluate the
sum of any two of these records and determine which two
sumed together provides this resultA suggested Solution.
I suggest you can create a new query, select SQL view and paste the
following text:SELECT [MyTable].[RecordID] AS Record1, [MyTable_1].[RecordID] AS Record2,
[MyTable].[NumberToSum] AS Value1, [MyTable_1].[NumberToSum] AS Value2,
[MyTable].[NumberToSum]+[MyTable_1].[NumberToSum] AS SumOfValues
FROM MyTable, MyTable AS MyTable_1
WHERE ((([MyTable].[NumberToSum]+[MyTable_1].[NumberToSum])=1160.09));Then edit the text just to do the next changes:
Change “MyTable” to the actual name of your list of records, (and also
MyTable_1 to ActualName_1 )
Change “RecordID” to the name of the field you used to identify your records
(primary key)
Change “NumberToSum” to the name of the field containing the number to sumI’m affraid because the size of your table, and probably the query is gonna
perform quite slow. I think it would be better if you try it first by
creating a little test table. Then you can decide if results satisfy your
needs.The query will provide you a complete list of all pair of records that sum
1160.09 -
WSStewart
AskWoody Loungerhere is a nice real world example
http://groups.google.com.au/groups?dq=&…s&start=100
I changed the url and tested it and it worked for me but failing that the main parts are as follows.
Problem
I have a list of 50,000 records of which two records need
to be removed. The olny thing I know about the two is that
their sum = 1160.09. How can I get Access to evaluate the
sum of any two of these records and determine which two
sumed together provides this resultA suggested Solution.
I suggest you can create a new query, select SQL view and paste the
following text:SELECT [MyTable].[RecordID] AS Record1, [MyTable_1].[RecordID] AS Record2,
[MyTable].[NumberToSum] AS Value1, [MyTable_1].[NumberToSum] AS Value2,
[MyTable].[NumberToSum]+[MyTable_1].[NumberToSum] AS SumOfValues
FROM MyTable, MyTable AS MyTable_1
WHERE ((([MyTable].[NumberToSum]+[MyTable_1].[NumberToSum])=1160.09));Then edit the text just to do the next changes:
Change “MyTable” to the actual name of your list of records, (and also
MyTable_1 to ActualName_1 )
Change “RecordID” to the name of the field you used to identify your records
(primary key)
Change “NumberToSum” to the name of the field containing the number to sumI’m affraid because the size of your table, and probably the query is gonna
perform quite slow. I think it would be better if you try it first by
creating a little test table. Then you can decide if results satisfy your
needs.The query will provide you a complete list of all pair of records that sum
1160.09 -
WSStewart
AskWoody LoungerTo be honest Don,
I’m a regular VB neophyte, I come from the land of access where dealing with files isn’t really a big part of it all.
I was amazed at the simplicity of the code and honestly don’t see where it could be optimised further.
Is there any reason that you would expect a class to be faster?
I’m guessing here but is it because you don’t need to re initalise all the variables, just delcare a new instance of a filesearch object and keep throwing folders at it or would you throw file specs?Stewart
-
WSStewart
AskWoody LoungerTo be honest Don,
I’m a regular VB neophyte, I come from the land of access where dealing with files isn’t really a big part of it all.
I was amazed at the simplicity of the code and honestly don’t see where it could be optimised further.
Is there any reason that you would expect a class to be faster?
I’m guessing here but is it because you don’t need to re initalise all the variables, just delcare a new instance of a filesearch object and keep throwing folders at it or would you throw file specs?Stewart
-
WSStewart
AskWoody LoungerSubject edited to correct spelling error, this will assist future lounge searches. StuartR
Hi all,I’m using the filesearch object to build a list of files in a specified location.
I discovered today that if there there are shortcuts to file types that are included in the filespec, the shortcut targets are included in the search results despite the shortcut having lnk extension. To me this doesn’t make sense.
Does anyone know how to exclude shortcuts or identify when looking at the foundfiles collection that it was a link not a physical file?
Thanks
Stewart
With appAccess.FileSearch .NewSearch .LookIn = Me.txtSelectLocation If chkSubFolders = 1 Then .SearchSubFolders = True Else .SearchSubFolders = False End If If Me.chkWord = 1 Then strFileSelected = strFileSelected & "*.DOC;*.DOT;" End If If Me.ChkExcel = 1 Then strFileSelected = strFileSelected & "*.XLS;*.XLA;*.XLT;*.XLL;" End If If Me.ChkAccess = 1 Then strFileSelected = strFileSelected & "*.MDB;*.MDE;*.MDW;*.MDA;*.MDZ;*.MDT;" End If If Not strFileSelected = "" Then .FileName = strFileSelected Else MsgBox "You Must Select File Types to Scan" & " - " & "No FileSpec Selected" Me.lblFiles.Caption = 0 GoTo Proc_Exit End If If .Execute 0 Then etc etc.......
-
WSStewart
AskWoody LoungerSubject edited to correct spelling error, this will assist future lounge searches. StuartR
Hi all,I’m using the filesearch object to build a list of files in a specified location.
I discovered today that if there there are shortcuts to file types that are included in the filespec, the shortcut targets are included in the search results despite the shortcut having lnk extension. To me this doesn’t make sense.
Does anyone know how to exclude shortcuts or identify when looking at the foundfiles collection that it was a link not a physical file?
Thanks
Stewart
With appAccess.FileSearch .NewSearch .LookIn = Me.txtSelectLocation If chkSubFolders = 1 Then .SearchSubFolders = True Else .SearchSubFolders = False End If If Me.chkWord = 1 Then strFileSelected = strFileSelected & "*.DOC;*.DOT;" End If If Me.ChkExcel = 1 Then strFileSelected = strFileSelected & "*.XLS;*.XLA;*.XLT;*.XLL;" End If If Me.ChkAccess = 1 Then strFileSelected = strFileSelected & "*.MDB;*.MDE;*.MDW;*.MDA;*.MDZ;*.MDT;" End If If Not strFileSelected = "" Then .FileName = strFileSelected Else MsgBox "You Must Select File Types to Scan" & " - " & "No FileSpec Selected" Me.lblFiles.Caption = 0 GoTo Proc_Exit End If If .Execute 0 Then etc etc.......
-
WSStewart
AskWoody LoungerDon,
That code absolutely screams. It had a bug that stoped it from returning any results but once I fixed that it took 5.71 seconds to run over my hard drive where filesearch took over 40seconds.
It still returned the lnk files but I added a second excluded filespec check and in 7.46 seconds it returns exactly what I needed.
Apart from solving my immediate problem you have provided me with a wonderful resource.
Thank you.
Stewart
-
WSStewart
AskWoody LoungerDon,
That code absolutely screams. It had a bug that stoped it from returning any results but once I fixed that it took 5.71 seconds to run over my hard drive where filesearch took over 40seconds.
It still returned the lnk files but I added a second excluded filespec check and in 7.46 seconds it returns exactly what I needed.
Apart from solving my immediate problem you have provided me with a wonderful resource.
Thank you.
Stewart
![]() |
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
-
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
1 hour, 39 minutes ago -
Firefox 139
by
Charlie
55 minutes ago -
Who knows what?
by
Will Fastie
9 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
3 hours, 17 minutes ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
11 hours, 33 minutes ago -
Misbehaving devices
by
Susan Bradley
1 hour, 24 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
1 day, 5 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
33 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
1 day, 3 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
2 hours, 59 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
18 hours, 3 minutes ago -
Rufus is available from the MSFT Store
by
PL1
1 day, 2 hours ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
2 days, 4 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
4 hours, 46 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
3 hours, 28 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
2 days ago -
Office gets current release
by
Susan Bradley
2 days, 3 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
3 days, 17 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
3 days, 1 hour ago -
Stop the OneDrive defaults
by
CWBillow
3 days, 18 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
4 days, 4 hours ago -
X Suspends Encrypted DMs
by
Alex5723
4 days, 6 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
4 days, 6 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
4 days, 7 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
4 days, 7 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
3 days, 20 hours ago -
Enabling Secureboot
by
ITguy
4 days, 3 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
4 days, 15 hours ago -
No more rounded corners??
by
CWBillow
4 days, 11 hours ago -
Android 15 and IPV6
by
Win7and10
4 days, 1 hour 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.