Hi again.
Worked around my problem by adding a "end of file" record, so it is the last 
one selected becomes the one missed in the transfer.
Not a good fix but it works and will have to do.

Keith



----- Original Message ----- 
From: "Keith Browning" <[email protected]>
To: <[email protected]>
Sent: Wednesday, July 22, 2009 10:59 AM
Subject: [ms_access] EOF in macros ??


Hi all,

I have a macro to transfer the results of a query on one form to another
form.

I have it repeating the macro to equal the number of records displayed on
the first form.
It takes the first record and sets the value of 3 fields in the second, then
changes to the next record in form1 and repeats.

The only problem I have is that if I have the repeat number the same as the
records to copy, I get an error "can't go to record" or suchlike after the
last setvalue when the form1 record gets stepped to next.
But the transfer is as I want it.

If I set the number of repeats to records-1, then the last record is
missing, but I don't get any displayed error.

Is there a way to use some "end of file"  or error detection  to control the
macro.  I would preffer to fix it in the macro, as I'm not too good with
VBasic.

best regards,

Keith Browning




------------------------------------

Yahoo! Groups Links





Reply via email to