-
WSase001
AskWoody LoungerDarn it – simple settings check would have resolved this…apologies.
Tools>Options>General> make sure error trapping is set as ‘Break on Unhandled Errors’
-
WSase001
AskWoody LoungerThanks Paul No there is no column with a space in it..however, I have just managed to solve it.
The problem arises when the formatting of the column is indented and vertical centre.
I set the formatting to left basic cells and the column now saves as csv without the trailing space.bit of a gotcha problem with the formatting dictating the resulting csv output.
thanks for checking Paul.
-
WSase001
AskWoody LoungerThe LEFT function is a red herring!
I have a module in the database that declares a function completely unrelated to the Left/Right/Mid and I had overlooked it when including PtrSafe in the ‘Declare Function’ script.As soon as I changed it to ‘Declare PtrSafe Function’ then the code and queries run fine once more.
thanks PATT, appreciate the quick jump in on this.
Sounds like I gotta bit of catching up to do with other macros and databases now. -
WSase001
AskWoody LoungerThe code is actually in the query field in this particular instance and is:
“Left([sort_code],2) & Mid([sort_code],4,2) & Right([sort_code],2) AS S_C,”all pretty basic run of the mill, but the left/right/mid causes the compile error
-
WSase001
AskWoody LoungerAlan,
Using math is a very good idea and the only way I think you’ll solve this problem. Here’s my take on that approach.
SQL:Code:SELECT aseOrders.Order_Ref, aseOrders.YearS, aseOrders.Period, aseOrders.Session FROM aseOrders WHERE (((aseOrders.YearS)=2014) AND ((([Period]*1000)+[Session])>=7004 And (([Period]*1000)+[Session])<=8001));
Access Query Design:
38390-aseQDJPG
Results:
38391-aseResults
Note: The results show the calculated field for reference only as you'll note both the SQL and Query Design omit that field!Note2: I multiplied the Period by 1000 before adding in the Session to avoid any rollover results since I didn't know how many Periods or Sessions you had.
HTH :cheers:
that certainly helps a lot thanks! Very much appreciated :cheers:
-
WSase001
AskWoody LoungerThanks RG
partial table for illustrative purposes is:
Order_Ref YearS Period Session
W15 2014 7 1
W16 2014 7 1
W17 2014 7 1
W18 2014 7 1
W19 2014 7 4
W20 2014 7 4
W21 2014 7 4
W22 2014 7 4
W23 2014 7 4
W24 2014 7 4
W25 2014 8 1Using the parameters of greater than/= period 7 session 1 and less than/= period 8 session 1
should return all lines of data, which it does
But if I want to see only those records where the parameters are greater than/= period 7 session 4 and less than/= period 8 session 1
I get nil returns when actually I am expecting to see Order_refs W19 to W25 incl.Hope that helps.
I am considering using math to make the period 7 session 1 into say 71 and use that ?
thanks
Alan -
WSase001
AskWoody LoungerJune 12, 2013 at 11:51 am in reply to: workbook links updating strange behaviour – Excel 2010 SP1 #1396519Thanks, been a long busy few weeks so just back on this.
Yep, all users have same mappings at logon and having checked their sessions the mappings are remaining in place.
I have tried the files in a controlled area and have found:
File1 – links to file2 using the mapped drive definition, e.g. M:alanfile2.xlsx
File1 also links to file2 using the unc of \manccommonalanfile2.xlsxWith file2 open I changed a couple of values
Did not save file2
changed view to File1
the cells which referred to the mapped drive have updated immediately
the cells which referred to the unc location have not updated at all
I did not select to update links, just switched views to the File1In File1, I now selected Dat>Edit Links
Both paths are indicated as containing links to external files.
I select the mapped drive link and select update (I know the data has already appeared in my file, but I selected it anyway)I select the unc link and select update – and although the link status says OK, the data on the worksheet is not updated (I guess until I SAVE the file2)
Strange goings on, and pretty disconcerting if multiple users are using the files.
Anyone else have similar experience?
TIA
Alan -
WSase001
AskWoody LoungerWe are experiencing this problem with virtualised servers and excel 2010 files.
Link formulas cells return #REF! and on other occassions return maybe a 0 instead.
I cannot repeat the error on demand but using the replace option of replacing “=” with “=” refreshes the link and hopefully returns the correct value.
In financial terms this is priority 1 serious with incorrect sums already having been reported to powers that be.Need a fix asap so it’s all hands on deck till it’s fixed.
-
WSase001
AskWoody LoungerThanks Guys, the sql was very basic where 1 query was linked on one to one join with another query based on a text field.
One of those queries that you take down to a single field and it still didn’t work.
The answer – Index the linked field in the audit query.SQL below resulted in an invalid operation
Code:SELECT [Find duplicates for dbo_TimesheetsB].Timesheet_Number, qry_Timesheets_Audit.Row_Id FROM qry_Timesheets_Audit RIGHT JOIN [Find duplicates for dbo_TimesheetsB] ON qry_Timesheets_Audit.Row_Id = [Find duplicates for dbo_TimesheetsB].Timesheet_Number;
the SQL below works without error – exactly same SQL
Code:SELECT [Find duplicates for dbo_TimesheetsB].Timesheet_Number, qry_Timesheets_Audit.Row_Id FROM qry_Timesheets_Audit RIGHT JOIN [Find duplicates for dbo_TimesheetsB] ON qry_Timesheets_Audit.Row_Id = [Find duplicates for dbo_TimesheetsB].Timesheet_Number;
-
WSase001
AskWoody LoungerWeirdly enough, the parameters are in an earlier query which feeds the end query, but I added the following in:
Code:Set qdf = db.QueryDefs(“qry_MT103_Output”) For Each prm In qdf.Parameters prm.Value = Eval(prm.Name) Next prm
then used:
Code:Set rs = qdf.OpenRecordset(dbOpenSnapshot)
and I get a result without the Too few parameters error.
-
WSase001
AskWoody LoungerForgot to add: form parameters are in the style of:
[Forms]![frm_Choice]![cmbEmployerRef]where cmbEmployerRef is a drop down selection on the form ‘frmChoice’
-
WSase001
AskWoody LoungerThanks John,
specified the parameters at the start so I thought that would not be part of this problem, so I then wrote the criteria direct into the query and removed the query parameters.
the export worked fine when using no form parameters.
Entering 1 form sourced parameter causes the code to error with “Too few parameters Expected:1”, so the error is being driven by the number of parameters in the actual query.the query is not being coded in the vba but is a standard query.
short section of code in the vba is:
Code:Dim strfile As String Dim intOutputfile As Integer Dim strOutput As String Dim db As dao.Database Dim rs As dao.Recordset Set db = CurrentDb strfile = “H:test4.txt” intOutputfile = FreeFile Open strfile For Output As #intOutputfile Set rs = db.OpenRecordset(“qry_MT103_Output”, dbOpenDynaset)
the final line above is the point of the debug error
Cheers
-
WSase001
AskWoody LoungerMarch 19, 2012 at 5:44 am in reply to: MT103 files and exporting individual records to text files #1325663Many thanks John, great starter to exactly what I need. Really appreciated.
Alan -
WSase001
AskWoody Loungerthanks Rory. I’ve implemented the calc for counting each indiivdual element of y/m/d rather than relying on datedif.
I did notice however that the error crept in when the start day date was of a greater figure than the current day date…i.e. if the original date was 10/01/2011 then the result for todays date was 1 year, 0 month and 1 day
but if the original date was 12/01/2011 then the result was 0 year, 11 month and 194 daysCheers
Alan -
WSase001
AskWoody LoungerThanks Guys, just trawling through the database now to check and correct.
Didn’t help that the 2008SM was installed blindly with nothing checked.
Thanks again.
alan
![]() |
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
-
Is there a comprehensve way to tranfer ALL current Edge Settings into a new Edge
by
Tex265
55 minutes ago -
Transferring ALL info/settings from current Firefox to new computer Firefox
by
Tex265
1 hour, 16 minutes ago -
DOGE Wants to Replace SSA 60 Million Line COBOL Codebase in Months
by
EyesOnWindows
1 hour, 41 minutes ago -
KB5051989 Usb printer Post Ipp
by
licencesti
3 hours, 42 minutes ago -
Removing bypassnro
by
Susan Bradley
25 minutes ago -
Up to 30 seconds to show “Recent Topics”
by
PL1
2 hours, 40 minutes ago -
Sound changes after upgrade from W11 23H2
by
WStaylorpsepa
4 hours, 23 minutes ago -
Windows bug blocks BIOS updates for Lenovo ThinkPad laptops
by
Alex5723
7 hours, 26 minutes ago -
O&O Software – ‘World Backup Day’ Sale
by
unbob
3 hours, 46 minutes ago -
Still version 23H2?
by
WSbxcfilm
8 hours, 14 minutes ago -
Ubuntu 25.04 (Plucky Puffin) Beta released
by
Alex5723
14 hours, 11 minutes ago -
How to install App Store apps on an external SSD
by
Alex5723
15 hours, 5 minutes ago -
Where is Windows going?
by
Susan Bradley
5 hours, 22 minutes ago -
Installing Feature Update Windows 11 24H2
by
geekdom
1 day, 8 hours ago -
Windows 11 Insider Preview build 27823 released to Canary
by
joep517
1 day, 8 hours ago -
Windows 11 Hotpatch
by
Hackmuss
16 hours, 15 minutes ago -
System Guard service error still won’t be fixed
by
Susan Bradley
1 day, 9 hours ago -
Operation ForumTroll: APT attack with Google Chrome zero-day exploit chain
by
Alex5723
1 day, 3 hours ago -
Troy Hunt of HaveIBeenPwned Phished
by
Lars220
1 day ago -
Microsoft Windows security auditing Code 5061
by
mpw
1 day, 22 hours ago -
Can’t display images in incoming Outlook 365 emails
by
WScopwriter
1 day, 5 hours ago -
Windows 11 Insider Preview Build 26200.5510 early builds of 25H2
by
Alex5723
1 day, 7 hours ago -
0Patch : Micropatches released for SCF File NTLM Hash Disclosure Vulnerability
by
Alex5723
1 day, 6 hours ago -
Select multiple emails and they all open up!
by
CeeJay
2 days, 23 hours ago -
How to remove an update preview
by
Gunny
1 day, 2 hours ago -
Third party add ins reminder
by
Susan Bradley
8 hours, 48 minutes ago -
OTF, which backs Tor, Let’s Encrypt and more, sues to save its funding
by
Nibbled To Death By Ducks
2 days, 17 hours ago -
Updating Windows 10 to Windows 11: 23H2 or 24H2?
by
Still Anonymous
3 days, 3 hours ago -
How can I update “Explorer Patcher”
by
WSplanckster
3 days, 5 hours ago -
Check out the home page for Signal
by
CAS
3 days, 3 hours ago
Recent blog posts
- Removing bypassnro
- Where is Windows going?
- System Guard service error still won’t be fixed
- Third party add ins reminder
- MS-DEFCON 4: Mixed bag for March
- Classic and Extended Control Panel — no need to say goodbye
- Things you can do in 2025 that you couldn’t do in 2024
- Revisiting Windows 11’s File Explorer
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.