L
LowFlyer
I've inherited a pretty horrible system which keeps track of customer
data and which is updated from a spreadsheet once a month. The data
from the spreadsheet is imported by manually running a long series of
queries. I thought it would be nice (and easier for non-technical
folk) if I could display a single form with a START button on it and a
set of progress indicators to show how far through things had gone.
All well and good so far.
During the import process a number of manual checks are required -
these are currently displayed as query results, and this seems like a
good way to continue. I'd like to run the query from my main code, and
only display the result form if there's actually anything on it. This
is where I've got so far:
Set rsAddress = CurrentDb.OpenRecordset("3a_CheckAddressDetails")
If Not rsAddress.EOF Then
rsAddress.MoveLast
rsAddress.MoveFirst
If rsAddress.RecordCount > 0 Then
DoCmd.OpenForm "Address Errors", , , , , acDialog
End If
End If
The form opens fine, but it seems a waste of effort and time for it to
run the query again when it opens, so what I've been trying to do is
figure out a way of passing the Recordset I've already got (rsAddress)
to the 'Address Errors' form.
Is this possible, and, if so, any hints as to how would be gratefully
received.
Thanks in advance,
Alastair
data and which is updated from a spreadsheet once a month. The data
from the spreadsheet is imported by manually running a long series of
queries. I thought it would be nice (and easier for non-technical
folk) if I could display a single form with a START button on it and a
set of progress indicators to show how far through things had gone.
All well and good so far.
During the import process a number of manual checks are required -
these are currently displayed as query results, and this seems like a
good way to continue. I'd like to run the query from my main code, and
only display the result form if there's actually anything on it. This
is where I've got so far:
Set rsAddress = CurrentDb.OpenRecordset("3a_CheckAddressDetails")
If Not rsAddress.EOF Then
rsAddress.MoveLast
rsAddress.MoveFirst
If rsAddress.RecordCount > 0 Then
DoCmd.OpenForm "Address Errors", , , , , acDialog
End If
End If
The form opens fine, but it seems a waste of effort and time for it to
run the query again when it opens, so what I've been trying to do is
figure out a way of passing the Recordset I've already got (rsAddress)
to the 'Address Errors' form.
Is this possible, and, if so, any hints as to how would be gratefully
received.
Thanks in advance,
Alastair