command button specific to form record

Dave_epic

Registered User.
Local time
Today, 22:43
Joined
Mar 6, 2008
Messages
39
Hi

I have a form where I have added a command button which opens a saved notepad file when you click it. However the command button performs the same action whichever record of the form you are on. What I want is a command button specific to only one record of a form, not the same across every record. How is this possible

Thanks
 
Is it supposed to open a different file? If so, how would it be named? What is your code now?
 
Hi

yes its supposed to open a different file on each record.

the code at the moment is

Private Sub view_Click()

Call Shell("NOTEPAD.EXE c\:test\0903IDC.txt", 1)
End Sub

thanks
 
You could try something along the lines of:

Call Shell("NOTEPAD.EXE c\:test\" & Me.Whatever & ".txt", 1)

You may need to build the string first, if it doesn't work within the Shell function.
 

Users who are viewing this thread

Back
Top Bottom