Link to home
Start Free TrialLog in
Avatar of snyperj
snyperjFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of snyperj

ASKER

Thanks!