Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bound form to recordset - odd results

Status
Not open for further replies.

Katy44

Technical User
Dec 12, 2003
723
GB
Hi, I have a very strange problem and would appreciate any help.
Access 2000
I have bound a form to a recordset (using the form's .Recordset property). The query I used to populate the recordset has an order by in it. The form has navigation buttons to move through the recordset.
The form has the following events:

On Open the rs is populated and the form is bound to it.
On Current I set the value of each control on the form to be a particular field in the recordset:

(Form_TestForm.Label199.Caption = rs.Fields("Id").Value

When the results come back, the very first record is a random record. The next one (using the nav button) is the first one, then the second, and so on (including the one that was first) and the last one is missing (so the numbers still seem to add up).
I'm sure this is a problem with which events I've used to fire off the bits of code, but I've tried loads of different combinations and I just can't get it to work.
By the way, the actual order is not particularly important to me, I just need to make sure all the records are there. I just put it in order so I could see better what was happening.

I hope someone can suggest something, thanks in advance for any help
 
Which record in the set are you assigning in the Open event?
(rs.MoveFirst)?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top