UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Recordset returnes 1 record only.    
 
   
narodigg
post Apr 23 2010, 09:06 AM
Post #1

UtterAccess Addict
Posts: 130
From: 46° 48' N/100° 47' W



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

This post has been edited by narodigg: Apr 23 2010, 09:12 AM
Go to the top of the page
 
+
AC2Designs
post Apr 23 2010, 10:17 AM
Post #2

UtterAccess Ruler
Posts: 1,048
From: Fort Worth, Texas



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
Go to the top of the page
 
+
narodigg
post Apr 23 2010, 12:35 PM
Post #3

UtterAccess Addict
Posts: 130
From: 46° 48' N/100° 47' W



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.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 09:02 PM