Hi,
Is there a way to determine the row number of the active record in a sub form?
Hi,
Is there a way to determine the row number of the active record in a sub form?
look at the record navigation index, bottom left corner.
tells the rec#, and the total recs shown.
Sorry, should have been more specific.
I'm trying to accomplish this in an On change event of a control in the sub form. Which I figured out.
I found a problem I have a tab with 2 sub forms, when I use a test script:
(Personnel sub form)
Private Sub WOJoinPer_PerID_Change()
If (Me.CurrentRecord = 1) Then
MsgBox ("Record 1")
End If
End Sub
(Test sub form)
Private Sub WOJoinTest_TestID_Change()
If (Me.CurrentRecord = 1) Then
MsgBox ("Record 1")
End If
End Sub
It works in Test sub form but I get this error in the Personnel sub form.
"The expression On Change you entered as the event property setting produced the following error: Object or class does not support the set of events."
Any thoughts on why I get the error?
Fixed.
I copied all the controls to a new form and it worked with out the error.
You might want to read this
What, no record numbers?
I always want to start at 1 and be numbered sequentially. If I can get at the sub-form row number I can simply set TableB.Column2 to that value.
See this link to my website where I explain how to add rank order in queries. http://www.mendipdatasystems.co.uk/r...ies/4594424063
However you really don't need that here
For the purpose you described in your last post, you would just reference the primary key field for that record