use a command button in a form to print selected fields

G

Guest

I have a database of employee details, name address, employed from, sickness,
etc.

I have a form created from the data.

I need a button on the form that when it is pressed will print an envelope
for the record in view on the form.

I know it can be done but I have no idea where to start.

Can anyone help me please?
 
J

John Vinson

I have a database of employee details, name address, employed from, sickness,
etc.

I have a form created from the data.

I need a button on the form that when it is pressed will print an envelope
for the record in view on the form.

I know it can be done but I have no idea where to start.

Can anyone help me please?

First, create a Query on the employee table selecting the fields you
want to print; use a criterion on the EmployeeID (you do have a unique
ID I hope...?) of

=Forms![NameOfYourForm]![EmployeeIDFieldName]

using your own fieldname and form name of course. Then create a Report
(using the wizard, or manually) based on this query which puts the
desired data onto the envelope. Put a command button on the form to
open the Report.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
J

J SCHWARTZ

I have some related questions. I'm working on a (terribly designed) Access
db at a non profit. It's just a bunch on unlinked tables (which should be
linked) with repetitive data entry into each table. I'm not about to try to
make this relational because I'm not fluent with Access. I do know enough to
make some basic changes and I'd like to be able to generate some of their
current Word forms from the data that already is in Access without them (or
me) typing it into a separate Word mail merge.

I probably will need both the facility that Vianni has requested... i.e. one
at a time print, but I also need to be able to print reports for a group of
unrelated people. Could someone who knows a lot more than me tell me if the
following is the right approach?

1) Add a "select field" that the user marks with an X for example, if that
person should be included in the group

2) Build a query that includes the fields i need in the report and uses a
criteria based on the Select field = X

3) Base the report on the query.

I'm not quite sure what to do next, because there could be multiple reports
which could benefit from this approach. I think I need a report menu AND
the single record command button. But what do I do if
1) each report might need to be activated for one person. Without a lot
(any?) of programming, is there a simple way to do this, and should it be
from the form menu or from my suggested new report menu?


2) How do I get the Selected fields reset to their default easily? I know
how to do it (I think... an Update Query?) but the other users at this
place wouldn't unless I simply tell them it's the rule that they have to run
the Update Query, or manually remove the X's. There is no menu tying the
whole thing together---they go into each table, form, report individually as
needed, so it has to be something very easy that they will have to be told
they have to remember and will cause lots of problems if they don't. I
should say that I've designed this kind of facility in an old R:BASE for DOS
database, and found the need for unselecting selected records but also
resetting the only the last set of unselected records to selected again so
the report could be rerun in case of problems, so it isn't quite as simple
as on/off.

Hope I haven't asked too many questions in one post. I only know enough
Access to be dangerous and understand that this organization will only
accept my suggestions for change if they are simple, both for them to use
and me to create. I do NOT want to do any programming if at all possible,
but if not, it has to be very simple. My programming days were many, but I
have health restrictions on typing and sitting which preclude any long
development work, especially when its a freebie.

Thanks for any help on any part of this. And please be gentle if I'm way
off base<g>

jo
 

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