You can put a command button on the form, and the command button can
print
just the record in that form.
Details in this article:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html
Hi Allen
Thanks for your help, I really appreciate it.
I got it showing the information on a similar form. Basically I made a
copy of the form and named it differently which saves any of the hassle
you spoke about. Seems to be working fine now.
I thought I would be able to print the details on each "page" on the
form but whenever I print it prints all the details.
Thanks again for your help.
Colin
Allen Browne wrote:
It's easy enough to open another different form with a filter:
DoCmd.OpenForm "Form2", WhereCondition:="[IsDone] = False"
But opening another instance of the same form is not as easy. You do
that
with the New keyword, but there is no WhereCondition, so you have to
find
another way to filter the new form. Typically you would do that by
assigning
the WhereCondition string to a public variable before you open the New
form,
and then use the Open event of the form to check the string, assign
the
Filter, and clear the string. (From memory, this all works correctly
for
forms, but does not work reliably for reports.)
But the new instance disappears as soon as the variable you used to
create
it goes out of scope. You therefore need a way to manage these
variables.
I
suggest you create a collection, and use the hWnd of the form
instances
as
the key to the collection. For details of how to do that, see:
Managing Multiple Instances of a Form
at:
http://allenbrowne.com/ser-35.html
Hi Allen
Thats brilliant, works perfect. Just out of interest is there any
way
that by clicking the filter button it could open a new window and
display the outstanding records there? Basically open the same form
again but running the filter?
Thanks
Colin
Allen Browne wrote:
Set the Filter of the form.
For example, if the yes/no field is named IsDone, you could show
only
the
ones where the box is checked using this code:
Me.Filter = "[IsDone] = True"
Me.FilterOn = True
To show the ones that are not done, change the first line to:
Me.Filter = "[IsDone] = False"
To have the forms always show only the undone ones, enter this into
the
Criteria of your query under the IsDone field:
False
Then change the RecordSource property of the form to this query.
I have a check box on a form in order for me to say when
something
has
been carried out or not. I have created a querie for this
purpose
but
I would like to filter these records and show them on the form,
is
this
possible?