Command button on form

K

KLR

I have created a form which shows a list of visit reports in Tabular
view.

I want to place a command button next to the visit report entry, so
that a user can click on the button and go directly to that report.

How do I go about this?

Many thanks
 
F

freakazeud

Hi,
I assume you mean a Continuous Form. Just add a button to the right of the
record in design view. The button could then have code behind it like this:

DoCmd.OpenReport Me.ControlWhichHoldsReportName, acViewPreview

The button will be repeated for each record in the form. This is how
Continuous Forms behave.
HTH
Good luck
 
R

Rick B

I believe the button wizard will walk you right through that. Turn on your
wizard by depressing the magic wand icon in your tool box, then place a
button on your form. The wizard will ask you all the right questions.
 
K

KLR

I used the button wizard which worked brilliantly, thanks very much. I
am going to study the code behind it though as I believe this will be
of interest. Thanks very much!
 

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