Full Version: Recordset returnes 1 record only.
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
narodigg
With an unbound form.
Using the Form_load even to fill a records set and sent text boxes to values with in it.

This is a continuous form that expects to have a 7 records in the records set. However it is only returning 1 record.


CODE
gblContract_ID = 3


Set rsView_PSA_Issues = CurrentDb().OpenRecordset("SELECT * FROM qryPSA_Issues_View WHERE [Contract_ID] = " & gblContract_ID)


PS. MS ACCESS 2003
AC2Designs
It seems there is other code that you did not post.
ie
where does rsView_PSA_Issues come from (declared)?
And what is it used for?
From what I see you are opening a dynamic query but doing nothing with it.

Also, are you setting your forms recordsource?
I would think you would need:

Me.RecordSource = "SELECT * FROM qryPSA_Issues_View WHERE [Contract_ID] = " & gblContract_ID & ";"

Hope that helps.
You may need to post more details about your situation.

Kevin
narodigg
QUOTE (AC2Designs @ Apr 23 2010, 04:17 PM) *
It seems there is other code that you did not post.
ie
where does rsView_PSA_Issues come from (declared)?
And what is it used for?
From what I see you are opening a dynamic query but doing nothing with it.

Also, are you setting your forms recordsource?
I would think you would need:

Me.RecordSource = "SELECT * FROM qryPSA_Issues_View WHERE [Contract_ID] = " & gblContract_ID & ";"

Hope that helps.
You may need to post more details about your situation.

Kevin


Setting the form recordsource instead of a new recordset worked. Thank you.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.