File path object howto-pls help

m001

Registered User.
Local time
Today, 09:00
Joined
Sep 9, 2002
Messages
18
I found the answer to my question in this forum :

http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=41391&highlight=file+path

I should use this code:

http://www.mvps.org/access/api/api0001.htm

Only I just know how to start an event from a button. I don't know where I have to paste the code (in a module?) and how do I call it when I push a button???

Please help me, I'm eager to learn and this solution is definitely what I need.

Thankyou for reading and eventualy answering this question.
 
1. On the form create a command button (if you get the Command button Wizard just hit cancel).

2. Right click on the button and select Properties.

3. On the ALL tab change the name of the button to what you would like it to be. For example, if you create a button to close a form call it cmdClose, or to run a search cmdSearch, etc.

4. On the EVENT tab put your curser in the OnClick Row, click the three dots (...) to the right of the row, and select Code Builder from the list of option. Access will open the Code window and add the following:

Private Sub cmdnameofbutton_Click()

End Sub


The code goes after the Private Sub and before the End Sub.

HTH
 
That's the part I know but thanks anyway. I even write some code.
But I get lost with this kind of long 'code' it doesn't work that way. It exists of different parts...


Any suggestions?
 
Can you post your code?

To be honest your last pst is kind of confusing, if you know where to put the code...what do you need to know?

I want to help, please don't think I'm being rude, but I'm not sure what you question is.
 
m001,
Put the "long" code, all of it in a new module and call it something meaningfull. Then call the function in the module from a command button. Place that call in the "on click" event. That should do the trick.
 

Users who are viewing this thread

Back
Top Bottom