guys, i am new in the vb access, i would like open the file (like pdf) as per data in the table (subform) using 1 button command..i am so glad to help me..thankx
guys, i am new in the vb access, i would like open the file (like pdf) as per data in the table (subform) using 1 button command..i am so glad to help me..thankx
You stated: "i would like open the file (like pdf) as per data in the table (subform)"...using 1 button command. If the, "as per data in the table (subform)", is a field that contains the file name you want to open and it's address, you could try something like...
Place a new Button on your form
Then, in the SUBFORM'S, VBA Current Event, add -
Private Sub Form_Current()
'Add in your own error handling
'Set PDF file Location variable
dim st1 as string
st1 = [Forms]![YourFormName]![YourSubformsName].Form![YourControlsNamethatContainstheFileNameandLocation]
'then, Assign variable to button's HyperlinkAddress Property
Me![YourButtonName].HyperlinkAddress = st1
End Sub
When the button is clicked, the appropriate file should open.
All the best,
Jim