-
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
-
My 3 monitors go black & then the Taskbar is moved to center monitor
by
saturn2233
4 hours, 24 minutes ago -
Apple backports fixes
by
Susan Bradley
4 hours, 32 minutes ago -
Win 11 24H2 will not install
by
Michael1950
4 hours, 37 minutes ago -
Advice to convert MBR to GPT and install Windows 11 Pro on unsupported PC
by
Andy M
4 hours, 8 minutes ago -
Photos from iPhone to Win 10 duplicating/reformatting to .mov
by
J9438
6 hours, 16 minutes ago -
Thunderbird in trouble. Here comes Thundermail
by
Alex5723
4 hours, 25 minutes ago -
Get back ” Open With” in context menus
by
CWBillow
17 hours, 18 minutes ago -
Many AMD Ryzen 9800X3D on ASRock have died
by
Alex5723
21 hours, 5 minutes ago -
simple general stupid question
by
WSaltamirano
15 hours, 5 minutes ago -
April 2025 Office non-Security updates
by
PKCano
1 day, 8 hours ago -
Microsoft wants to hear from you
by
Will Fastie
8 hours, 12 minutes ago -
Windows 11 Insider Preview Build 22635.5160 (23H2) released to BETA
by
joep517
1 day, 11 hours ago -
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
1 day, 17 hours ago -
Test post
by
Susan Bradley
1 day, 19 hours ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
1 day, 21 hours ago -
SSD shuts down on its own
by
CWBillow
1 day, 12 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 5 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 7 hours ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
1 day, 7 hours ago -
Today is world backup day
by
Alex5723
1 day, 22 hours ago -
Windows .exe on Mint
by
Slowpoke47
3 hours, 51 minutes ago -
Reviewing your licensing options
by
Susan Bradley
4 hours, 45 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
1 day, 4 hours ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
23 hours, 54 minutes ago -
Making sense of Settings in Windows 11
by
Simon Bisson
1 day, 1 hour ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
2 days, 5 hours ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
2 days, 2 hours ago -
YouTube Ad Blocker Blocker
by
bbearren
2 days, 3 hours ago -
Obscure historical facts about Windows
by
Cybertooth
2 days, 4 hours ago -
Microsoft Backup
by
Linda2019
1 day, 20 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.