Passing a fieldname as a parameter

anthonys

Registered User.
Local time
Today, 21:33
Joined
Feb 4, 2005
Messages
40
I have an issue i would be grateful for some assistance on.

I have a function that has a fieldname passed into it (relevant code below). i then want to use that fieldname to reference it on a form but it does not accept it.

What am i doing wrong??

Any suggestions will be greatly appreciated!!

Private Function OpenSelectedFiles(Image As String)
'Opens files which have been double clicked on the sub-form
Dim szFileToOpen As String

On Error GoTo ErrorHandler

szFileToOpen = Forms!frmSchemes.Form. & Image
Application.FollowHyperlink (szFileToOpen)

Exit Function
 
Anthonys,

Something like:

szFileToOpen = Forms!frmSchemes.Controls(Image)

Wayne
 

Users who are viewing this thread

Back
Top Bottom