-
WSAPATTO03
AskWoody LoungerHans,
Here is a stripped version of what we use. Without a huge amount of records in a text file, the error can not be recreated. However you may be able to look at the code and give recommendations to improve performance and lessen the chance of getting an error. Any suggestions are GREATLY appreciated.
Regards,
Drew -
WSAPATTO03
AskWoody LoungerThe last test I ran opened a form and populated appoximately 10 captions with the number of records in 10 different tables. Originally I used DCount for this and had no problems. It worked fast with no delay. When trying to make my code more efficient, I used the recordset approach. After that, the form took 3-5 seconds to open (can’t remember how many records were in each table…if that matters).
Thanks for your help. I will try using the recordset approach on this one. May just live with the delay.
Regards,
Drew -
WSAPATTO03
AskWoody LoungerThe subdatasheet is an intermediate table for data that I get from our PDM system, which is pasted from my clipboard after coping from a system report. After it’s pasted, I select the import button and the data cascades into multiple tables. For now, I don’t need to insert data into some of the tables, so I only select 12 of the 35 columns (script does the rest). It would be nice to have a convenient button to select the columns I’m interested in.
Thanks,
Drew -
WSAPATTO03
AskWoody LoungerApril 10, 2006 at 7:48 pm in reply to: Open a text file in native application (Access 2003) #1009152Perfect!
Thank you -
WSAPATTO03
AskWoody LoungerPerfect…Thank you
-
WSAPATTO03
AskWoody LoungerThanks!
-
WSAPATTO03
AskWoody LoungerMark,
I overlooked the fact that I had a setfocus command used on an open event that set focus to a control on Page1.
I changed this and it now pops up on Page2.Thanks for the help,
Drew -
WSAPATTO03
AskWoody LoungerYes…
Page2 (Page Index = 0)
Page1 (Page Index = 1)
Page3 (Page Index = 2)Still defaults to Page1.
Regards,
Drew -
WSAPATTO03
AskWoody LoungerJanuary 26, 2006 at 1:01 pm in reply to: Loading records with VBA; getting Error 3058 (Access 2003) #996683Hans,
Forget about my last question. Somewhere on the lines I accidentally remove the ‘On Error Goto’ line. I put this back in an works perfectly.
Thank you very much for your help.
Drew -
WSAPATTO03
AskWoody LoungerJanuary 26, 2006 at 12:53 pm in reply to: Loading records with VBA; getting Error 3058 (Access 2003) #996682Thanks Hans.
I tried this and am now getting a 3022 error message, so I added 3022 to the case, but am still getting the 3022 error. Am I doing something wrong?
ErrHandler:
Select Case Err
Case 3058, 3022 ‘ Duplicate key
‘ Continue with next statement in code
Resume Next
Case Else ‘ Other errors
‘ Report error and exit
MsgBox Err.Description, vbExclamation
Resume ExitHandler
End Select
End SubI had also thought that I could do a check before a new record was added to the keyed table by using a DCount with the 3 key fields in the table as criteria. However, it seem like their should be a better way than this.
Thanks,
Drew -
WSAPATTO03
AskWoody LoungerSorry.
-
WSAPATTO03
AskWoody LoungerHans,
Does this mean that you can’t go back in a text file? Similar to a recordset.MovePrevious.
Attached is the code that I’m trying to get to work. You’ll probably be able to decifer this better than I could explain it. What I’m trying to do is find the end of a record by finding a double-quote at the end of one line input (previous) and a double quote at the beginning of the next line input (current). The problem I’m having, is that if a line in the text file does not start with a double-quote, the string it pulls out is an empty string. Does Line Input require double-quotes at the beginning of each line? If so, is there a work around? (Microsoft help on this is very limited on this).
Thanks!
Drew -
WSAPATTO03
AskWoody LoungerMust line input always be used when working with text files? And, is their anyway to set the pointer to the previous line (or is it pointer forward only)?
Thanks,
Drew -
WSAPATTO03
AskWoody LoungerHans,
Logically, I think I have a way to parse this out, but I have a VBA question.
When opening a text file in VBA and using loops with it, how does VB know what location in the file you are at? I see that your code continues to loop by using the string found in Line Input #, but I don’t know how it knows to go to the next line. In addition, is their a way to use Left(), Mid(), and instr() functions with text files?Thanks,
Drew -
WSAPATTO03
AskWoody LoungerI can’t agree with you more. ๐
We are a small division of a large corporate comany. Our PDM system is nearly 5 years old and service packs have not been installed due to going to the next version of the software incorporating all other business units. The corporate deadline for this keeps on getting pushed out. In the mean time, it makes it very difficult for myself and others to report on what we put into our system which is the reason why I continue to use extracts along with Access.
For my problem, I’ll either try to clean the extracts manually or just leave the problem fields out.Thank you very much for your help.
Regards,
Drew
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Thunderbird release notes for 128 esr have disappeared
by
EricB
4 minutes ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
33 minutes ago -
Apple releases 18.5
by
Susan Bradley
52 minutes ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
1 hour, 59 minutes ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
2 hours, 36 minutes ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
9 hours, 33 minutes ago -
No HP software folders
by
fpefpe
10 hours, 17 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
2 hours, 30 minutes ago -
Stay connected anywhere
by
Peter Deegan
15 hours, 40 minutes ago -
Copilot, under the table
by
Will Fastie
6 hours, 53 minutes ago -
The Windows experience
by
Will Fastie
21 hours, 54 minutes ago -
A tale of two operating systems
by
Susan Bradley
12 hours, 51 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
1 day, 3 hours ago -
Where’s the cache today?
by
Up2you2
1 day, 18 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
1 day, 11 hours ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
11 hours, 40 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
1 day, 19 hours ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
2 days, 11 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
2 days, 11 hours ago -
regarding april update and may update
by
heybengbeng
2 days, 13 hours ago -
MS Passkey
by
pmruzicka
1 day, 15 hours ago -
Can’t make Opera my default browser
by
bmeacham
2 days, 21 hours ago -
*Some settings are managed by your organization
by
rlowe44
2 days, 7 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
2 days, 19 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 days, 15 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
4 days ago -
AI slop
by
Susan Bradley
1 day, 18 hours ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
4 days, 1 hour ago -
Two blank icons
by
CR2
1 day, 10 hours ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 12 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.