etech0
asked on
access display number of record in form (not ID)
Hi!
I have an access subform that displays a datasheet view list of comments. Is there a way to extract the number of the currently selected comment? I can't use ID, because there are many more comments, and the table is filtered to only show comments that are linked to the currently selected taskID in the parent form. I want the extracted number to also take into account the way the form is sorted, with most recent comments on top.
(The reason I want this is to have a textbox that shows "showing comment x of total")
Can this be done?
I have an access subform that displays a datasheet view list of comments. Is there a way to extract the number of the currently selected comment? I can't use ID, because there are many more comments, and the table is filtered to only show comments that are linked to the currently selected taskID in the parent form. I want the extracted number to also take into account the way the form is sorted, with most recent comments on top.
(The reason I want this is to have a textbox that shows "showing comment x of total")
Can this be done?
ASKER
Thanks for your response. However, when the code runs, I get an "Object doesn't support this property or method" error.
Here is my code, modified to apply to my parent and sub form, and run from a module:
Here is my code, modified to apply to my parent and sub form, and run from a module:
Forms!catwebwork2f.CommentNum = "Showing Comment " & MForms!catwebwork2f.CatWebWork2CommentsSummaryF.Recordset.AbsolutePosition + 1 & " of " & Forms!catwebwork2f.CatWebWork2CommentsSummaryF.Recordset.RecordCount
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That works great! Thanks.
Me.yourtextboxname = "Showing Record " & Me.Recordset.AbsolutePosit