Problem with addding new record in subform

D

DJ Walker

I am using Access 2000 to created a form/sub-form group.

I have a data entry from that has a sub-form that changes
based on the choices made in two pull-down controls. when
the choice is made in the second pull down then the source
of a sub-form in the form changes.

When looking up data the form works fine. But when I go
to enter a new record. The sub-form switches to the
correct sub-form but the form does not become active for
several seconds. If you press tab to go to the sub-form
it skips the sub-form and goes to the next control on the
main form. If you try to click on a control on the sub-
form then it jumps to the next control on the main form.
Like it does not see the sub-form. If you try a few
seconds later to access the sub-form it's control works
fine.

New records also seem to cause a memory error.

Any help would be appreciated.

Thanks,

DJ Walker
(e-mail address removed)
www.stlzoo.org
St Louis Zoo
Network Programmer
 
A

Allen Browne

It will take a moment for Access to load the form into the subform control,
sort out the LinkMasterFields/LinkChildFields, run the query, load the
records into the subform, and display them.

The fundamental question is why different subforms are needed. While there
are designs where you could need a couple or 4 different related tables to
accurately describe the main entity, is there a way to avoid this for your
data? For example, would it be possible to combine those different subtables
into one, with another field to distinguish them?

If you believe you still need a few subforms, would it be better to put 4
subforms on the main form, and then toggle their Visible property in the
Current and AfterUpdate events of the main property? It would take longer to
load the form initially, but eliminate the delay in switching to the
appropriate subform.

The memory error is a concern. Presumably you mean, it is being shut down by
Windows. This can easily happen when reassigning the RecordSource of a form,
if a bound field suddenly disappears or changes data type (like calculated
fields can). You can also get this error if the field nominated in the
LinkChildFields is not represented by a text box in the subform (though I've
only seen that in A2002 and 2003).

Hope that stimulates some useful directions.
 

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