Wait till Bound Query is Finished loaded.

J

Jim Paroski

I have a Access 2002 adp Form bound to a SQL Query. Is there any way I can
check and do a wait loop untill all records are loaded before continuing.

Thanks.
 
V

Vadim Rapp

Hello Jim:
You wrote in conference microsoft.public.access.adp.sqlserver on Mon, 1 Mar
2004 13:58:12 -0600:

JP> I have a Access 2002 adp Form bound to a SQL Query. Is there any way I
JP> can check and do a wait loop untill all records are loaded before
JP> continuing.

The following will work:

Dim WithEvents rs As Recordset

Private Sub Form_Open(Cancel As Integer)
Set rs = Recordset
End Sub


Private Sub rs_FetchComplete(ByVal pError As ADODB.Error, adStatus As
ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
If adStatus = adStatusOK Then MsgBox "Ready"
End Sub


Vadim
 
J

Jim Paroski

Thanks for the quick reply unfortunately this does not work since I am
loading the recordsource on the fly from a command_btn after opening the
form. Like:
Me.InputParameters = "'" + [Forms]![job Entry]![Account] + "'"
Me.RecordSource = "dbo.JOBNUMSEARCHFORM"
(Need to wait for finish loading here)
Any Suggestions
Thanks
 
V

Vadim Rapp

Hello Jim:
You wrote in conference microsoft.public.access.adp.sqlserver on Tue, 2 Mar
2004 12:00:08 -0600:

JP> Thanks for the quick reply unfortunately this does not work since I am
JP> loading the recordsource on the fly from a command_btn after opening
JP> the form. Like:
JP> Me.InputParameters = "'" + [Forms]![job Entry]![Account] + "'"
JP> Me.RecordSource = "dbo.JOBNUMSEARCHFORM"
JP> (Need to wait for finish loading here)

so what prevents from assigning rs = recordset after you set the
recordsource?

Vadim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top