-
WSrpwoods
AskWoody LoungerThe symptoms described in this KB article are almost exactly what I experience, except there is no shift-key being pressed.
I’m going to try-out the code anyway (detecting shift-key), and see what happens. -
WSrpwoods
AskWoody LoungerI used an error handler, and absolutely no error occurs. Everything just stops with the newly opened workbook containing the text file data.
-
WSrpwoods
AskWoody LoungerSub GetNewData()
‘Import data from ‘CompLists.txt’ into new Excel file
Workbooks.OpenText Filename:=”C:TempCompList.txt”, Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), _
Array(10, 1), Array(11, 1))MsgBox “CompList.txt opened”, , “GetNewData”
This MsgBox doesn’t display when the macro is run, but it does if the macro is stepped through.
-
WSrpwoods
AskWoody LoungerI don’t know enough about the web stuff (HTML, etc.). I will talk to our IT group for more hand-holding.
But let me answer, and then ask a bit more. The shortcut opens the .MDB, invoking the security from the specified .MDW. I am opening the DAP (.htm) directly (through Windows Explorer, or within IE by the FileOpen dialog).
Can I invoke the security .MDW in a UNC path? What’s the basic syntax for that?(I won’t ask for a lesson on all this web stuff. I know that this is not the appropriate place for that level of detail.)
Thank you! -
WSrpwoods
AskWoody LoungerYes, the return value is Currency.
Thanks, again. -
WSrpwoods
AskWoody LoungerThe Function worked brilliantly!
I was running into some troubles – and was perplexed – until I finally realized that my Assets field was too large for a variable of type Integer or even Long. When I finally set it to Double, it worked.Thank you!
-
WSrpwoods
AskWoody LoungerThat’s probably a good idea. I’ve never done that before, though.
I will look in some books, but if you might give me a simple example of the SQL (or query) that would reference the function, and the function itself, that would be helpful.Thank you…
-
WSrpwoods
AskWoody LoungerSELECT cudata.CU_Nbr, cudata.CU_Name, cudata.State, cudata.Orig_Live_Date, cudata.Nbr_Members, cudata.Assets_Long, 15000+IIf([Nbr_Members]>7500,IIf([Nbr_Members]>20000,(20000-7500)*2.75+IIf([Nbr_Members]>50000,(50000-20000)*1.75+IIf([Nbr_Members]>100000,(100000-50000)*0.75,([Nbr_Members]-50000)*0.75),([Nbr_Members]-20000)*1.75),([Nbr_Members]-7500)*2.75),0)+15000+IIf([Assets_Long]>25000000,IIf([Assets_Long]>100000000,(100000000-25000000)*0.000475+IIf([Assets_Long]>300000000,(300000000-100000000)*0.00025+IIf([Assets_Long]>750000000,(750000000-300000000)*0.00009,([Assets_Long]-300000000)*0.00009),([Assets_Long]-100000000)*0.00025),([Assets_Long]-25000000)*0.000475),0) AS XP2_Lic_Amt, [XP2_Lic_Amt]*0.05 AS Interlinq_Amt, DateDiff(“m”,[Orig_Live_Date],Date()) AS Mos, IIf((DateDiff(“m”,[Orig_Live_Date],Date()))>60,0,(60-DateDiff(“m”,[Orig_Live_Date],Date()))/60) AS Prorate_Rate, ([XP2_Lic_Amt]+[Interlinq_Amt])*IIf([Mos]>60,0,(60-[Mos])/60) AS PR_Amt, xp2_install.xp_Discount_Rate, IIf([xp_Discount_Rate]>0,([XP2_Lic_Amt]-[PR_Amt])*[xp_Discount_Rate],0) AS Disc_Amt, [XP2_Lic_Amt]*0.25 AS P1234_XP2, [PR_Amt]*0.25 AS P1234_PR, xp2_install.xp_PSA_Signed_PSA_Amt, IIf([xp_PSA_Signed_PSA_Amt]<([P1234_XP2]-[P1234_PR]),[xp_PSA_Signed_PSA_Amt],([P1234_XP2]-[P1234_PR])) AS P1_PSA_Cr, IIf(([xp_PSA_Signed_PSA_Amt]-[P1_PSA_Cr])<([P1234_XP2]+[Interlinq_Amt]-[P1234_PR]),([xp_PSA_Signed_PSA_Amt]-[P1_PSA_Cr]),([P1234_XP2]-[P1234_PR])) AS P2_PSA_Cr, IIf(([xp_PSA_Signed_PSA_Amt]-([P1_PSA_Cr]+[P2_PSA_Cr]))<([P1234_XP2]-[P1234_PR]),([xp_PSA_Signed_PSA_Amt]-([P1_PSA_Cr]+[P2_PSA_Cr])),([P1234_XP2]-[P1234_PR])) AS P3_PSA_Cr, IIf(([xp_PSA_Signed_PSA_Amt]-([P1_PSA_Cr]+[P2_PSA_Cr]+[P3_PSA_Cr]))<([P1234_XP2]-[P1234_PR]),([xp_PSA_Signed_PSA_Amt]-([P1_PSA_Cr]+[P2_PSA_Cr]+[P3_PSA_Cr])),([P1234_XP2]-[P1234_PR])) AS P4_PSA_Cr
FROM cudata INNER JOIN xp2_install ON cudata.CU_Nbr = xp2_install.cu_ID
ORDER BY cudata.CU_Name, cudata.State; -
WSrpwoods
AskWoody LoungerThank you, Wendell, for that helpful information.
Do you know if there is an ODBC or MDAC version that ‘fixes’ this problem? -
WSrpwoods
AskWoody LoungerYour retort, Charlotte, is not helpful — it does not address the real issue of my posting.
I notice that you’re more prone to shoot questions back at people seeking help than you are to provide helpful advice. That’s too bad.Wendell’s reply to my post was much more helpful. He started off by addressing the issue that I brought up — not some side issue. Only after he addressed the core issue did he make a comment about the Relationship issue.
Now, to answer your question, the relationships are a hold-over from before I upsized from Access to SQL Server. And I have kept them only for convenience — they are especially helpful to other users when doing ad-how querying.
-
WSrpwoods
AskWoody LoungerThe VBA routine worked brilliantly.
I have not tried the other suggestions (yet).This is fine for cleaning-up data. But I’d still prefer to avoid filling a cell with something that later needs to be cleared (after pasting special as value). So if anyone knows how to do that in a formula within a cell…
I thank you both for your responses. You’ve made my life easier, today.
-
WSrpwoods
AskWoody LoungerWeird: when I update the tables with Linked Table Manager, the SQL Server table updates correctly but the SQL Server View drops the PK designation.
So, every time I update this linked SQL Server View (as a table in Access) I end up having to delete the linked table (deleting any relationships along the way) and then re-link it from scratch.I think this is a BUG in MS Access!
(BTW: I have to update the link because I made to modify the base table — add a column or something.)
If anyone has words of wisdom or guidance for this situation, I’d love to read them!
-
WSrpwoods
AskWoody LoungerOK. I don’t have a ready code example for that (hopefully someone else reading this will).
You need to capture the ‘no matching record’ error — open the 2nd form to add a new record and supply the ID.
(I’ll go look for some code; perhaps some other Lounge Lizard will beat me to it.) -
WSrpwoods
AskWoody LoungerI figured it out!
When I linked the View, somehow I did not designate a Primary Key column. Without a PK, you cannot update the table.Thanks for all your help, everyone!
-
WSrpwoods
AskWoody LoungerSounds like a ‘find specific record’ situation. Using the Wizard to create a button that opens another Form has an option to ‘find a specific record’ and produces code like the following:
Dim stDocName As String
Dim stLinkCriteria As StringstDocName = “My_form”
stLinkCriteria = “[MyID]=” & Me![MyID]
DoCmd.OpenForm stDocName, , , stLinkCriteriaLet us know if I’m not addressing your actual situation.
![]() |
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
-
Network Issue
by
Casey H
4 hours, 44 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
10 hours, 12 minutes ago -
May 2025 Office non-Security updates
by
PKCano
10 hours, 39 minutes ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
12 hours, 34 minutes ago -
pages print on restart (Win 11 23H2)
by
cyraxote
11 hours, 50 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
14 hours, 46 minutes ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
14 hours, 47 minutes ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
22 hours, 8 minutes ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
6 hours, 31 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
1 day, 9 hours ago -
How much I spent on the Mac mini
by
Will Fastie
8 hours, 54 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
4 hours, 5 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
1 day, 15 hours ago -
Setting up Windows 11
by
Susan Bradley
10 hours, 25 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
1 day, 10 hours ago -
Powershell version?
by
CWBillow
1 day, 11 hours ago -
SendTom Toys
by
CWBillow
8 hours, 15 minutes ago -
Add shortcut to taskbar?
by
CWBillow
1 day, 15 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
2 days, 8 hours ago -
How can I install Skype on Windows 7?
by
Help
2 days, 6 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
1 day, 13 hours ago -
We live in a simulation
by
Alex5723
2 days, 22 hours ago -
Netplwiz not working
by
RetiredGeek
2 days, 8 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
3 days, 10 hours ago -
Microsoft is killing Authenticator
by
Alex5723
12 hours, 24 minutes ago -
Downloads folder location
by
CWBillow
3 days, 17 hours ago -
Remove a User from Login screen
by
CWBillow
2 days, 12 hours ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
3 days, 8 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
3 days, 8 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
1 day, 10 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.