-
DisplayRecordset
I have disabled the default navigation buttons for a form and instead created a textbox to display the number of records. This is the expression I have entered in the control source of the textbox:
="Record " & [CurrentRecord] & " of " & Count([SNo]) & ""
Now the problem is the textbox doesn't get automatically updated when I enter a new record. For example, if I currently have 20 records, and I am on the last record, it correctly shows "Record 20 of 20". But if I add a new record, then it shows "Record 21 of 20". I have to manually refresh the page for the record to get updated. Any way for the form to automatically refresh?
-
Do a Me.txtBoxName.Requery on one of the events of whatever you use to add a record. That should refresh the textbox everytime you add/change/delete a record
-
But I can't do a me.txtboxName.requery in the control source of the textbox
. So I should write the code in an event. Do I write it in the beforeUpdate or the afterUpdate event?
-
You would write it in the AfterUpdate or OnChange events of whatever it is you use to create a record.
-
umm, it still does not work! I added a new record and it still shows "Record 31 of 30"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules