?
Solved

Link to Excel at link table won't 'movenext'

Posted on 2011-03-23
2
Medium Priority
?
303 Views
Last Modified: 2012-05-11
Access 2003 - I linked to an Excel 2003 spreadsheet as a 'table link'.  In code, I do this:
dim db as dao.database
dim src as dao.recordset
set db = codedb
set src = db.openrecordset("myexceltable",dbopensnapshot)
if not src.eof and not src.bof then
    src.movefirst
    do while not src.eof
          '------- code
         src.movenext
    loop
end if

The problem is, although 300+ records appear in the linked table, only 1 record is accessed by this openrecordset??
src.recordcount = 1

What's up with this?
Thanks
Scott C
0
Comment
Question by:clarkscott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 35200527
if not src.eof then
src.movelast

msgbox src.recordcount
    src.movefirst
    do while not src.eof
          '------- code
         src.movenext
    loop
end if
0
 
LVL 20

Author Closing Comment

by:clarkscott
ID: 35200613
Thanks... That's what I needed to get through this recordset.  Without the MoveFirst AND MoveLast at the beginning of the code, when I got to the src.movenext the app errored with an 'overflow' message (??).  By adding the src.movelast, the code now loops thru the entire recordset.

Scott C
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question