Re: Need help with Loop that is not repeating the function

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



John,

Going back to your most recent comment:

"You're not passing those values to the function. I don't know where it should
be getting them from, but I'm surprised the code even compiles since you're
calling a two-argument function with no arguments, and you're calling it as if
it were a sub rather than a function. I gather that it's looking up an
address... but what do you want to DO with that address once you've looked it
up?"

I think this whole paragraph sums up where I am, and am not...

I don't know enough to know where or how to feed the function the neccesary
address data that it can then use to poll yahoo's gecoder and get back the
lat/lon gecodes that I want to feed back into my table. As have I said, I
have managed to do it with any one record (that the form is open on), but
only the one record; not a whole recordset. I assume in my ignorance that If
the function was happily doing it for one record, then by putting in a loop,
it would iterate through the recordset and do them all. Obviously I was wrong
in that assumption, hence the original reuqest in this thread.


As I see it, the function should be geting the records from the open
recordset: 'Generate_KML_Points_Groups'

as in this example:
Set qdf = db.QueryDefs("Generate_KML_Points_Groups")
Set rs = qdf.OpenRecordset(dbOpenDynaset)

as to how I actually 'feed' them sequentially to the function, I just don't
know, because I thought the loop would take care of that.

I don't know where to go from here, except to ask for some help on getting
the records from the recordset to parse through the function and write the
resultant yahoo data back to the recordset/table.

regards

Eric



"John W. Vinson" wrote:

On Sun, 26 Oct 2008 17:07:01 -0700, efandango
<efandango@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Thanks for the feedback, I will re-read it tomorrow, can I come back to you
gain on this?. I am in the UK, and it's past midnight now, and I've been on
this all weekend...

Sure, Eric - hope you got some rest.
--

John W. Vinson [MVP]

.



Relevant Pages

  • Re: Easiest way to create a large Access Table
    ... John W. Vinson wrote: ... table; open a Recordset based on it; and loop through the creation sequence ... Dim rs As DAO.Recordset ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Loop through Table while Renaming Files
    ... "John W. Vinson" wrote: ... You can't loop through a table per se, but you can create a Recordset based on ... Dim rs As DAO.Recordset ...
    (microsoft.public.access.modulesdaovba)
  • Re: Loop in button code
    ... go through my YG table and compare sales volumes of inventory items from ... I thought that once I got a loop to work off my button on a form I could ... "John W. Vinson" wrote: ...
    (microsoft.public.access.modulesdaovba)
  • Re: Loop in button code
    ... loop to work I will fill in the right code, ... "John W. Vinson" wrote: ... just loop forever on the first record. ...
    (microsoft.public.access.modulesdaovba)
  • Creating many forms from one table - Newbie - John W. Vinson
    ... John W. Vinson wrote: ... Creating many forms from one table - Newbie ... A good spreadsheet design is often a very bad table design. ...
    (microsoft.public.access.forms)