HELP!!!

K

Ken Snell

The KB article is telling you to create that code in a form or a project,
and then run that code. The code as shown is expecting that you have put a
command button (named Command1) on your form, and that the code is in the
module behind the form. It also expects that you have set the OnClick event
of the command button to be this code procedure.

Does this help ?
 
S

skc

no it does not
-----Original Message-----
The KB article is telling you to create that code in a form or a project,
and then run that code. The code as shown is expecting that you have put a
command button (named Command1) on your form, and that the code is in the
module behind the form. It also expects that you have set the OnClick event
of the command button to be this code procedure.

Does this help ?

--
Ken Snell
<MS ACCESS MVP>




.
 
K

Ken Snell

Let's start at point 1-- in your form's design view, create a command button
on your form (name it Command1).

point 2--- Click on that command button...then open Properties window. Click
on Event tab, and click in box next to On Click. Then click on box at far
right (box has three little dots on it). Select "Code Builder" when window
asks. You'll then be in Visual Basic Editor.

point 3--- You'll see two lines of code and a blank line between them:
Private Sub Command1_Click()

End Sub

Copy the code from the KB article and paste it between these two lines of
code (delete the duplicate "Private Sub etc." and "End Sub" lines).

You now have put the code into your form's module, and the code will be
called when you click the command button when the form is open in normal
view.
 

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