Sub-Form nightmares - really bad ones.

M

Mudoch

I'm trying to "fix" an older Access project. it has one master form with the
datasource is Header, 2 sub-forms on it also with the datasource as header. I
keep getting the error about record is in use when moving between form and
sub-forms. this causes data loss.

The sub-forms are used like sections, shown when needed, moved up or down in
the main form for quick entry/operator viewing. the header table has over 200
fields many of them are check boxes on the form(s).

Is any safe way to link the header data from form to sub-form? what are the
needed steps in the sub-forms (they load first) to ensure they are seeing the
correct master record?
 
M

Mark A. Sam

Mudoch,
Having the header data in subforms doesn't make sense. I suggest, instead
that you eliminate the subforms and use a tab control, or pages within the
mainform. You are getting the error becuase of record locking. The
subforms are accessing the same record at the same time as the main form.
You can try removing the record locking, but it is still bad form.

God Bless,

Mark
 
M

Mudoch

Thanks Mark for the reply.

Thats what I thought, It's a bug thats been in there since the beggining and
I warned the developer about.... Now he's gone and I've got to fix the dang
thing.

You mentioned "pages" which control is that I've not seen that one. At this
point I can not goto a tabbed form without pissing off the President of the
company and getting into a Q and A session he has not desire to listen to.

I've looked and the group frame but that's no good as it only allows on
check box on. What I need to do is control what is displayed and still allow
for a full "page" printout. What I mean by the full page print is that when
all subforms are on the screen we "print" to paper the entire form.

If I could get the tabbed form pass, is there a limitation on the number of
controls I can use?

BAck under VB4 I had a tabbed form with many fields, labels, etc and after
adding one more field control the app broke with too many controls in form
message.
 
M

Mark A. Sam

Without messing around, I would say that a subform could work, but you need
to keep it in single form mode, and set the RecordLocks properites on the
forms to NoLocks. That might do it for you. There is a control called a
page break, similar to Word, but I don't ever use it and can't give you any
advice on its functionality. I kow that the Docmd object has a GoTOpage
method and macros have a GoToPage action. Maybe that will help you.

If you do get the subforms functional, you can have subforms stacked on top
of each other and make them visible or invisible though code like:

[Subform1].Visible = True
[Subform2].Visible=False
[Subform3].Visible=False

You could have buttons for example to change the configuration.

God Bless,

Mark
 

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