I tried updating the recordset after making the query though the form recordsource method, but nevertheless it continues to go wrong. I guess it's because recordset of the form hasn't been updated, so when the user presses the next button (actually I am doing a docmd.gotorecord acNext), it goes to the next record that is in the table (the 2nd record). RecordCount always returns the correct number of rows for table-type. ![]() In other words, the form goes to the 2nd record. Set rst dbs.OpenRecordset ('SELECT FROM Table1', dbOpenDynaset) If rst.AbsolutePosition > -1 Then Move to the last row rst.MoveLast Now get the count lngCount rst.RecordCount If you want, you can now move again rst.MoveFirst - Continue processing - End If. ![]() However, instead of going to the next, it goes to the record after the 1st. In the form, the user can search a record and go to a specified record.Īfter getting that record, the user presses the button to display the next record. In this video, I'm going to show you how to use Command Buttons to navigate through the records, close a form, or open another form in your Microsoft Access. Naturally, the form shows the 1st record contained in the table. However, I have a problem I do not know how to fix. In the forms I've included record navigation buttons for the user to move between the different records of the table (next, previous, etc). ![]() Obviously I used the built-in Go To Next Record macro when creating the button. I'm working on a project in Access 2007 with a lot of VBA code and a lot of forms to the front end. Here is the macro being used for the 'next record' button so far. This is my first question but I have to say that is not the first time that I've used the site.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |