Multiple Subforms - names keep changing

S

Shelley

Access 2002

In developing a Main 'Tickets' form with multiple
subforms, the first subform I placed was 'sfmWO'. Parent-
Child Relationship was based on ('WorkOrder','WorkTask')
which is the primary key in the table that 'sfmWO' is
based on.

I then placed several other subforms on the main form--
'sfmQtys', 'sfmCrewHours', 'sfmSWOs'. Each of those forms
are linked on the 'TicketNbr' field and the underlying
tables have 'Ticket' as part of their primary keys. The
main form's source is 'Tickets' and the primary key
is 'Ticket'.

The problem I'm having is that periodically the 'source'
of all the other subforms changes ON IT'S OWN to 'sfmWO',
instead of the correct subform. I change it back, save the
form, and it's ok until the next time I try to open or
edit the form. Them ALL the subforms are based on sfmWO
again.

Is this a known bug? How do I fix it?

Shelley
 
S

Shelley

I devised a work-around... Using the OnOpen event for the
main form to redefine the source object of each subform.

Would still like to know if there is a better way to fix
this though.

Shelley
 
K

Kelvin

Did you have any code in the OnEnter or OnExit event of the first subform?
If you copy and pasted the other subforms from the first subform, this will
copy any codes that were in the subform as well. I don't know of any bugs
that would do this. You must have some code that is doing this.

Kelvin
 

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