snyperj
asked on
How to call this sub from another form
I have a Form I will call frm1
I have a subform on that form I will call sfrm1
On sfrm1, I have the following code:
Public Sub BookmarkLine()
Dim vLine As Long
Dim rs As DAO.Recordset
vLine = Me.[Line_No]
Me.Requery
Set rs = Me.RecordsetClone
rs.FindFirst "[Line_No]=" & vLine
Me.Bookmark = rs.Bookmark
End Sub
I need to call BookmarkLine(), from another standalone form I will call frm2. Basically, when a command button on frm2 is clicked, I need it to call BookmarkLine()
Please help with the synatax of the command button to make the call. Thanks
I have a subform on that form I will call sfrm1
On sfrm1, I have the following code:
Public Sub BookmarkLine()
Dim vLine As Long
Dim rs As DAO.Recordset
vLine = Me.[Line_No]
Me.Requery
Set rs = Me.RecordsetClone
rs.FindFirst "[Line_No]=" & vLine
Me.Bookmark = rs.Bookmark
End Sub
I need to call BookmarkLine(), from another standalone form I will call frm2. Basically, when a command button on frm2 is clicked, I need it to call BookmarkLine()
Please help with the synatax of the command button to make the call. Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER