[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2011-03-23
2
Medium Priority
?
308 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

650 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