microsoft access vba code syntax help

I have a module called mod_Lock that has a public function:

Public Function acbWhoHasLockedRecord(frm As Form)
.....
End Function

I have an unbound text box (called txtSearch) on my form.  I want to call this function in the after update event of the text box:

Private Sub txtSearch_AfterUpdate()

................somehow call the function

End Sub

How do I do this?  The name of my form is "Service Log New"
sxxguptaAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:


Private Sub txtSearch_AfterUpdate()

Call acbWhoHasLockedRecord (Me)

End Sub
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you call the function with "me" as argument, "me" is the keyword to use to refer to the form itself:

 
Private Sub txtSearch_AfterUpdate()

 acbWhoHasLockedRecord me

End Sub 

Open in new window

0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
:-)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
sxxguptaAuthor Commented:
thanks mx
0
 
hnasrCommented:
'   ................somehow call the function
Dim strWho As String       ' to hold the return value of the function
strWho = acbWhoHasLockedRecord(Me)
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
You are welcome ...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.