-
WSBodders
AskWoody LoungerJust to let you know that I finally solved this problem by starting the PC in Safe Mode. This then allowed me to copy the file to another folder & everything worked again.
Thanks for all the helpful suggestions
Nick
-
WSBodders
AskWoody LoungerI tried that but with exactly the same result – I still cannot open it.
-
WSBodders
AskWoody LoungerPaul
Thanks for the reply. I have checked the Security tab & everyone has Full Control of the file.
When I try to do anything to it however, I get the message “You require permission from NICKBODD-PCNick to make changes to this file.” I am logged on as Nick and my Pc is called NICKBODD-PC. The only possible problem I can see is that if I go through Control Panel/System the PC is named “nickbodd-PC”, and I cannot change that – the OK button is greyed out. Might that be significant ?
Nick
-
WSBodders
AskWoody LoungerApologies – I did not realise the sites were linked.
Unfortunately no replies on either thread.
-
WSBodders
AskWoody LoungerWendell
Thanks for your reply.
I am using Office 2003 SP3 for Access and Excel. The code occurs in a class module which I am building to provide a generic function to import an Excel worksheet, or a range on a worksheet, into an Access database. TransferSpreadsheet is too limiting for this, eg it overwrites existing data in the table whether you want it to or not.
I had not thought of temporarily linking to the spreadsheet, but I will give this a try. I cannot guarantee whether any cells have >255 chars, nor in which row they would appear if they did.
Bodders
-
WSBodders
AskWoody LoungerI got ahead of myself when I said that using the ODBC driver actually solved the problem.
Instead of just ignoring the invalid rows where a cell had >255 characters, it now returns this error on the rstXLS.MoveNext statement :
[Microsoft][ODBC Excel Driver] The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
What I really wanted to be able to do was to have some code that would check the field length, and then only move the first 255 characters into the database field – but the code will never reach this point as it will error on the MoveNext statement.
Any more thoughts on this ?
Bodders
-
WSBodders
AskWoody LoungerWendell & Reid – thank you both for your replies.
The answer was to use ODBC instead of OLEDB, as below :
‘
‘———————————————————–
‘This is the OLE DB driver
‘———————————————————–
‘With cnnXLS
‘ .Provider = “Microsoft.Jet.OLEDB.4.0”
‘ strConn = “Data Source=” & Me.XLSName & “;Extended Properties=””Excel 8.0;HDR=YES;IMEX=1″””
‘ .ConnectionString = strConn
‘ .Open
‘End With
‘
‘———————————————————–
‘This is the ODBC driver
‘———————————————————–
With cnnXLS
.Provider = “MSDASQL”
strConn = “Data Source=” & Me.XLSName & “;Extended Properties=””Excel 8.0;HDR=YES;IMEX=1″””
.ConnectionString = “Driver={Microsoft Excel Driver (*.xls)};” & _
“DBQ=” & Me.XLSName & “; ReadOnly=False;”
.Open
End WithSaved me from a lot of heartache
Thanks again guys
Bodders
-
WSBodders
AskWoody LoungerYou could use code like this:
Code:Dim intValue As Integer Dim i As Integer intValue = 1 ' the ID of the record to select For i = 0 To Me.ComboBox1.ListCount - 1 If Me.ComboBox1.List(i) = intValue Then Me.ComboBox1.ListIndex = i Exit For End If Next i
where ComboBox1 is the name of the combo box.
Hans
Thanks very much for that. I was hoping there was just a property like Itemdata in an Access form to set, but it looks like I will have to use this loop.
Bodders
-
WSBodders
AskWoody LoungerHans
Thanks for that – I will give it a try.
Bodders
-
WSBodders
AskWoody LoungerBrilliant Hans – that is exactly what I needed. Took about 5 mins to run.
Many thanks
Bodders
-
WSBodders
AskWoody LoungerHans
Thanks for checking. I have managed to find a way around this – I closed the form & re-opened it hidden in Design view. I then set the Height and Top properties of the subforms, saved the form, and finally re-opened it in Normal view. No scrollbars in sight.
Nick
-
WSBodders
AskWoody LoungerHans
I have a main form which has 9 subforms. I am dynamically resizing them according to how many records they contain. This process is run when a command button is clicked.
It all works well apart from some subforms display scrollbars, seemingly at random. When I click the command button again, the subforms display correctly, i.e. no scrollbars.
Do you have any suggestions as to why this should be ?
Thanks for your help
Nick
-
WSBodders
AskWoody LoungerAndy
This is not specific to reports but I have found http://www.joelonsoftware.com/%5B/url%5D to be a really useful resource. There’s lots of articles and discussion boards which I am sure would be helpful.
Regards
Nick
-
WSBodders
AskWoody LoungerHans
It does. The first 5 columns are text, and are fixed. The next 5 are the months from the current one to month+4. These will change every month.
Regards
Nick
-
WSBodders
AskWoody LoungerHans
I specified the column headings as a string as follows (as they appear when the query runs):
“Voyage”,”load Port”,”Discharge Port”,”Expo Start”,”Expo End”,01/03/2008″,”01/04/2008″,”01/05/2008″,”01/06/2008″,”01/07/2008″
I really need the form as a subform as it fits in with several other subforms on the main form
Regards
Nick
![]() |
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
-
Uninstalr Updates
by
jv16
20 minutes ago -
Apple zero days for April
by
Susan Bradley
50 minutes ago -
CVE program gets last-minute funding from CISA – and maybe a new home
by
Nibbled To Death By Ducks
10 hours, 31 minutes ago -
Whistleblower describes DOGE IT dept rumpus at America’s labor watchdog
by
Nibbled To Death By Ducks
10 hours, 41 minutes ago -
Seeing BSOD’s on 24H2?
by
Susan Bradley
3 hours, 21 minutes ago -
TUT For Private Llama LLM, Local Installation and Isolated from the Internet.
by
bbearren
1 hour, 5 minutes ago -
Upgrade from Windows 10 to 11
by
Holdsworth8
19 hours, 21 minutes ago -
Microsoft : AI-powered deception: Emerging fraud threats and countermeasures
by
Alex5723
22 hours, 11 minutes ago -
0patch
by
WSjcgc50
1 hour, 14 minutes ago -
Devices might encounter blue screen exception with the recent Windows updates
by
Susan Bradley
15 hours, 33 minutes ago -
Windows 11 Insider Preview Build 22631.5261 (23H2) released to Release Preview
by
joep517
1 day, 1 hour ago -
Problem opening image attachments
by
RobertG
1 day, 2 hours ago -
advice for setting up a new windows computer
by
routtco1001
1 day, 17 hours ago -
It’s Identity Theft Day!
by
Susan Bradley
21 hours, 47 minutes ago -
Android 15 require minimum 32GB of storage
by
Alex5723
1 day, 22 hours ago -
Mac Mini 2018, iPhone 6s 2015 Are Now Vintage
by
Alex5723
1 day, 22 hours ago -
Hertz says hackers stole customer credit card and driver’s license data
by
Alex5723
1 day, 23 hours ago -
Firefox became sluggish
by
Rick Corbett
1 day, 19 hours ago -
Windows 10 Build 19045.5794 (22H2) to Release Preview Channel
by
joep517
2 days, 2 hours ago -
Windows 11 Insider Preview Build 22635.5235 (23H2) released to BETA
by
joep517
2 days, 3 hours ago -
A Funny Thing Happened on the Way to the Forum
by
bbearren
1 day ago -
Download speeds only 0.3Mbps after 24H2 upgrade on WiFi and Ethernet
by
John
5 hours, 18 minutes ago -
T-Mobile 5G Wireless Internet
by
WSmmi16
1 day, 1 hour ago -
Clock missing above calendar in Windows 10
by
WSCape Sand
1 day, 2 hours ago -
Formula to Calculate Q1, Q2, Q3, or Q4 of the Year?
by
WSJon5
2 days, 18 hours ago -
The time has come for AI-generated art
by
Catherine Barrett
1 day, 22 hours ago -
Hackers are using two-factor authentication to infect you
by
B. Livingston
2 days, 7 hours ago -
23 and you
by
Max Stul Oppenheimer
2 days, 15 hours ago -
April’s deluge of patches
by
Susan Bradley
19 hours, 4 minutes ago -
Windows 11 Windows Updater question
by
Tex265
8 hours, 59 minutes 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.