> Set the Filter of the form.
>
[quoted text clipped - 20 lines]
> > I would like to filter these records and show them on the form, is this
> > possible?
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

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Hi Allen
>
[quoted text clipped - 25 lines]
>> > I would like to filter these records and show them on the form, is this
>> > possible?
weircolin@googlemail.com - 09 Aug 2006 15:53 GMT
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
> It's easy enough to open another different form with a filter:
> DoCmd.OpenForm "Form2", WhereCondition:="[IsDone] = False"
[quoted text clipped - 49 lines]
> >> > I would like to filter these records and show them on the form, is this
> >> > possible?
Allen Browne - 09 Aug 2006 16:36 GMT
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

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Hi Allen
>
[quoted text clipped - 68 lines]
>> >> > this
>> >> > possible?
weircolin@googlemail.com - 10 Aug 2006 09:31 GMT
Hi Allen
Thanks for your help, its really appreciated. I don't think the last
example will be suitable for what I'm trying to do. Basically the
charity I work for collate issues and concerns from unpaid carers and
represent them on their behalf. Some of the issues are anonymous and
therefore I can't link the reference number to the names on our
database (where the autonumber field is assigned) so sometimes the ID
will be 0 and therefore print more than the one needed.
It isn't a big problem so not too worried about it. Thanks so much for
your help.
Take care
Colin
> You can put a command button on the form, and the command button can print
> just the record in that form.
[quoted text clipped - 81 lines]
> >> >> > this
> >> >> > possible?
Allen Browne - 10 Aug 2006 09:44 GMT
Even if the person is unknown, you could still add an AutoNumber field to
the table so there is an automatically generated unique number for the
record?

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Hi Allen
>
[quoted text clipped - 104 lines]
>> >> >> > this
>> >> >> > possible?
weircolin@googlemail.com - 10 Aug 2006 11:08 GMT
Hi Allen
Thats why ypu're the MVP! Hadn't thought of that. Done it now and
just hidden it on the form.
Thanks again for all your help.
Colin
> Even if the person is unknown, you could still add an AutoNumber field to
> the table so there is an automatically generated unique number for the
[quoted text clipped - 112 lines]
> >> >> >> > this
> >> >> >> > possible?