restrict subform to new entries only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Service Log form that tracks phone calls/emails that members make
for support services.

The main form is the info. about the person person calling. I also have 2
subforms. One for data entry for each individual call and a second subform
for the prior calls. I do this so the person entering the data doesn't have
to scroll to the bottom for every new entry.

I have restricted the entry subform by setting the "data entry" property to
"yes".

All works fine until I filter on a person (parent form). Once I do that
all of the prior calls appear in the data entry form as well as the second
form for prior calls. It's as if the data entry property gets turned off.

Is this a bug in Access? Is there something I can do to prevent this?

Thanks!
Meryl
 
Hi Meryl,

I don't believe it to be a bug in Access. If the data entry subform is
linked to the parent, the child (subform) is going to display all records
related to the link.

Presuming the parent and two subforms are pulling from the same table, you
might want to add a checkbox to the table and name it something like
"completed".

Create two separate queries from the table. One query for the data entry,
the other for the call history.

Include the "completed" checkbox in the queries, placing a 0 in the Criteria
of the data entry "completed" checkbox criteria and a -1 in the call history
"completed" checkbox criteria.

Set your subforms to their respective query. Bring in the data entry
checkbox to the data entry subform. In the "After Update" Event of whatever
is the last data entry field entered by your user, place a code that goes
something like:
[completed] = -1
Me.Requery

This should prevent the data entry subform from displaying unwanted
historical info, while the history will receive ONLY historical, completed
information.
 
Gwit,

Thank you. I can see how your solution would work, however, it still seems
like an Access bug to me. The entry subform has the "data entry" property
set to "yes" which when you read in the help what that means, is that it
should only allow new entries.

As I said before, if I'm adding new entries, the records appear in the
correct forms - i.e. the entry form is blank for the next entry and the
history appears in the prior call history form as soon as the record is
saved. It's only when I use a filter on the parent form, that the data entry
subform seems to lose it's property setting.

It's a shame I have to code around this when there was a property setting
just for this scenario.

Again, thanks for your suggestion. It seems the best solution, given the
problem.

Meryl

Gwhit said:
Hi Meryl,

I don't believe it to be a bug in Access. If the data entry subform is
linked to the parent, the child (subform) is going to display all records
related to the link.

Presuming the parent and two subforms are pulling from the same table, you
might want to add a checkbox to the table and name it something like
"completed".

Create two separate queries from the table. One query for the data entry,
the other for the call history.

Include the "completed" checkbox in the queries, placing a 0 in the Criteria
of the data entry "completed" checkbox criteria and a -1 in the call history
"completed" checkbox criteria.

Set your subforms to their respective query. Bring in the data entry
checkbox to the data entry subform. In the "After Update" Event of whatever
is the last data entry field entered by your user, place a code that goes
something like:
[completed] = -1
Me.Requery

This should prevent the data entry subform from displaying unwanted
historical info, while the history will receive ONLY historical, completed
information.



Meryl said:
I have a Service Log form that tracks phone calls/emails that members make
for support services.

The main form is the info. about the person person calling. I also have 2
subforms. One for data entry for each individual call and a second subform
for the prior calls. I do this so the person entering the data doesn't have
to scroll to the bottom for every new entry.

I have restricted the entry subform by setting the "data entry" property to
"yes".

All works fine until I filter on a person (parent form). Once I do that
all of the prior calls appear in the data entry form as well as the second
form for prior calls. It's as if the data entry property gets turned off.

Is this a bug in Access? Is there something I can do to prevent this?

Thanks!
Meryl
 
Gwit,

I tried your method. The only problem is the requery only works on the new
entry subform. I don't see the new records appearing in the prior call
history subform.

In the afterupdate event, can I requery the prior call history subform. If
so, can you tell me the syntax?

I tried: Forms!subfrm-prior-history.requery but Access says it doesn't
recognize this form

Can you specify a form when requerying?

Meryl

Gwhit said:
Hi Meryl,

I don't believe it to be a bug in Access. If the data entry subform is
linked to the parent, the child (subform) is going to display all records
related to the link.

Presuming the parent and two subforms are pulling from the same table, you
might want to add a checkbox to the table and name it something like
"completed".

Create two separate queries from the table. One query for the data entry,
the other for the call history.

Include the "completed" checkbox in the queries, placing a 0 in the Criteria
of the data entry "completed" checkbox criteria and a -1 in the call history
"completed" checkbox criteria.

Set your subforms to their respective query. Bring in the data entry
checkbox to the data entry subform. In the "After Update" Event of whatever
is the last data entry field entered by your user, place a code that goes
something like:
[completed] = -1
Me.Requery

This should prevent the data entry subform from displaying unwanted
historical info, while the history will receive ONLY historical, completed
information.



Meryl said:
I have a Service Log form that tracks phone calls/emails that members make
for support services.

The main form is the info. about the person person calling. I also have 2
subforms. One for data entry for each individual call and a second subform
for the prior calls. I do this so the person entering the data doesn't have
to scroll to the bottom for every new entry.

I have restricted the entry subform by setting the "data entry" property to
"yes".

All works fine until I filter on a person (parent form). Once I do that
all of the prior calls appear in the data entry form as well as the second
form for prior calls. It's as if the data entry property gets turned off.

Is this a bug in Access? Is there something I can do to prevent this?

Thanks!
Meryl
 
Me.Parent.subfrm-prior-history.form.Requery

--
Paul Overway
Logico Solutions
http://www.logico-solutions.com


Meryl said:
Gwit,

I tried your method. The only problem is the requery only works on the new
entry subform. I don't see the new records appearing in the prior call
history subform.

In the afterupdate event, can I requery the prior call history subform.
If
so, can you tell me the syntax?

I tried: Forms!subfrm-prior-history.requery but Access says it doesn't
recognize this form

Can you specify a form when requerying?

Meryl

Gwhit said:
Hi Meryl,

I don't believe it to be a bug in Access. If the data entry subform is
linked to the parent, the child (subform) is going to display all records
related to the link.

Presuming the parent and two subforms are pulling from the same table,
you
might want to add a checkbox to the table and name it something like
"completed".

Create two separate queries from the table. One query for the data
entry,
the other for the call history.

Include the "completed" checkbox in the queries, placing a 0 in the
Criteria
of the data entry "completed" checkbox criteria and a -1 in the call
history
"completed" checkbox criteria.

Set your subforms to their respective query. Bring in the data entry
checkbox to the data entry subform. In the "After Update" Event of
whatever
is the last data entry field entered by your user, place a code that goes
something like:
[completed] = -1
Me.Requery

This should prevent the data entry subform from displaying unwanted
historical info, while the history will receive ONLY historical,
completed
information.



Meryl said:
I have a Service Log form that tracks phone calls/emails that members
make
for support services.

The main form is the info. about the person person calling. I also
have 2
subforms. One for data entry for each individual call and a second
subform
for the prior calls. I do this so the person entering the data doesn't
have
to scroll to the bottom for every new entry.

I have restricted the entry subform by setting the "data entry"
property to
"yes".

All works fine until I filter on a person (parent form). Once I do
that
all of the prior calls appear in the data entry form as well as the
second
form for prior calls. It's as if the data entry property gets turned
off.

Is this a bug in Access? Is there something I can do to prevent this?

Thanks!
Meryl
 
Thank you!

Paul Overway said:
Me.Parent.subfrm-prior-history.form.Requery

--
Paul Overway
Logico Solutions
http://www.logico-solutions.com


Meryl said:
Gwit,

I tried your method. The only problem is the requery only works on the new
entry subform. I don't see the new records appearing in the prior call
history subform.

In the afterupdate event, can I requery the prior call history subform.
If
so, can you tell me the syntax?

I tried: Forms!subfrm-prior-history.requery but Access says it doesn't
recognize this form

Can you specify a form when requerying?

Meryl

Gwhit said:
Hi Meryl,

I don't believe it to be a bug in Access. If the data entry subform is
linked to the parent, the child (subform) is going to display all records
related to the link.

Presuming the parent and two subforms are pulling from the same table,
you
might want to add a checkbox to the table and name it something like
"completed".

Create two separate queries from the table. One query for the data
entry,
the other for the call history.

Include the "completed" checkbox in the queries, placing a 0 in the
Criteria
of the data entry "completed" checkbox criteria and a -1 in the call
history
"completed" checkbox criteria.

Set your subforms to their respective query. Bring in the data entry
checkbox to the data entry subform. In the "After Update" Event of
whatever
is the last data entry field entered by your user, place a code that goes
something like:
[completed] = -1
Me.Requery

This should prevent the data entry subform from displaying unwanted
historical info, while the history will receive ONLY historical,
completed
information.



:

I have a Service Log form that tracks phone calls/emails that members
make
for support services.

The main form is the info. about the person person calling. I also
have 2
subforms. One for data entry for each individual call and a second
subform
for the prior calls. I do this so the person entering the data doesn't
have
to scroll to the bottom for every new entry.

I have restricted the entry subform by setting the "data entry"
property to
"yes".

All works fine until I filter on a person (parent form). Once I do
that
all of the prior calls appear in the data entry form as well as the
second
form for prior calls. It's as if the data entry property gets turned
off.

Is this a bug in Access? Is there something I can do to prevent this?

Thanks!
Meryl
 
Back
Top