My subform Source Object changes when I save the main form why?

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

Guest

I've created a form that has a Tab Control with 5-pages. 3 of the pages have
subforms that I created in design view. On the last page, I've set the
Source Object of the subform to 'sfrmHistory' with the Link fields set to the
primary key of the primary form data source and the accompanying primary key
of the sfrmHistory data source. However, when I save my changes or go to
Form View, the Source Object of the last page has changed to the Source
Object of the subform on the first page of the tab control. I change the
Source Object back to what it should be, click Save and exit. I then open
the form from the Database Window and the last page on the tab has still
reverted to another Source Object. I've compacted and repaired the database
- to no affect.
 
Sandy N said:
I've created a form that has a Tab Control with 5-pages. 3 of the
pages have subforms that I created in design view. On the last page,
I've set the Source Object of the subform to 'sfrmHistory' with the
Link fields set to the primary key of the primary form data source
and the accompanying primary key of the sfrmHistory data source.
However, when I save my changes or go to Form View, the Source Object
of the last page has changed to the Source Object of the subform on
the first page of the tab control. I change the Source Object back
to what it should be, click Save and exit. I then open the form from
the Database Window and the last page on the tab has still reverted
to another Source Object. I've compacted and repaired the database -
to no affect.

Probably the Name AutoCorrect feature -- called by some "Name
AutoCorrupt" -- is confused. In the Tools -> Options.. dialog, on the
General tab, uncheck all the Name AutoCorrect options, then compact your
database, and see if the problem goes away.
 
That's exactly what the problem was. While in tools and out of curiosity, I
decided to track the AutoCorrect entries and sure enough when I viewed the
table, the entries were right there. I turned off the AutoCorrect - but now
when I change a field or table name, I'll have to manually make the changes
everywhere (queries, reports, forms, etc...) in the database, correct?
That's a bit of a bummer but I'm glad it solved my initial problem....

Thanks!!
 
Sandy N said:
That's exactly what the problem was. While in tools and out of
curiosity, I decided to track the AutoCorrect entries and sure enough
when I viewed the table, the entries were right there. I turned off
the AutoCorrect - but now when I change a field or table name, I'll
have to manually make the changes everywhere (queries, reports,
forms, etc...) in the database, correct? That's a bit of a bummer but
I'm glad it solved my initial problem....

I always leave it turned off, so I can't say for sure, but maybe you can
leave "track Name AutoCorrect info" turned on but "perform Name
AutoCorrect" turned off. Then you could -- conceivably -- turn that on
again at need to have changes applied, fix any errors it introduces,
save the changes, and turn it off again. I don't know how well that
would work, though.

There are third-party products out there that do this sort of thing.
I've heard of "Find And Replace", "Speed Ferret", and various tools from
FMS, Inc., whose name escapes me right now. The first two, at least,
are quite inexpensive, and FMS produces extremely good and powerful
tools to help in Access development.

For my own part, I just have a couple of utility routines I wrote to
search through queries, forms, reports, etc., for a given string. That
helps me on those rare occasions when I have to change the name of an
object in the course of development.
 
Thanks Dirk. I was struggling with this problem for months. I should have
came here months ago and prevented the hours of frustration.
 

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

Back
Top