hyperlink field 2 Questions

G

gr

Hi all,
First Question: in which event of an hyperlink field
should I place a code that saves the path of a file? I try
the after update and on click event. if the field is null
works good it ask the user if wants to add the file. But
then every time the user clicks there keeps asking. If i
write something like "if isNull(me.passfile)..." then it
works, but if the user erase the field and want to add a
new path the code is not executed anymore.
here is the code:

On Error GoTo PassFile_err
If IsNull(Me.PassFile) Then
If (MsgBox("Do you want to add Passport File now?",
vbQuestion + vbYesNo, "Please respond") = vbYes) Then
Me.PassFile.Value = WinAPI.ahtCommonFileOpenSave
Else
Me.Comments.SetFocus
End If
End If
Salir_Sub:
Exit Sub
PassFile_err:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Salir_Sub

Second question: how to open the file when the user clicks
in the hyperlink field on the form??

thx,
gr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top