misc short questions

C

Cat Winslow

Is it best to set default values at table level or on the form?

Is it best to base a main form/subform on a single table each, or a query
that pulls all data together with a single form with tabs? Or does it matter?

When do you have to add fields to a form and set the visible property to No?
Does this relate to subforms that will be linked to that form with invisible
fields?

I haven't ever seen hard-and-fast rules about these, simple as they seem...
Thanks in advance,
Cat
 
J

Jeff Boyce

See comments in-line...

Cat Winslow said:
Is it best to set default values at table level or on the form?

If you set a default for a field at the table level, any form you
subsequently base on that field will "inherit" the default setting.

If you set your default on a form, no other forms inherit the setting, and
the field in the table doesn't inherit the setting.

What would work better in your situation?
Is it best to base a main form/subform on a single table each, or a query
that pulls all data together with a single form with tabs? Or does it
matter?

In my experience (NOTE - JOPO - just one person's opinion) it is much easier
to base any form on a query, rather than on a table. The use of
main-form/sub-form handles one-to-many relationships between the underlying
data (queries/tables/whatever). But if you have so many "manys" related to
your one that you crowd your screen, using a tab control gives you multiple
pages on which you can place those sub-forms.
When do you have to add fields to a form and set the visible property to
No?
Does this relate to subforms that will be linked to that form with
invisible
fields?

For what purpose? I suppose I can recall a couple situations in which I
used an invisible text control to "hold" a value I needed to refer to, but
not to save back to the underlying data set.

As for subforms linking back to a main form, the subform control on the main
form has "parent-child" relationship properties that let Access
automatically keep the subform synch'ed to the main form's record.
I haven't ever seen hard-and-fast rules about these, simple as they
seem...
Thanks in advance,
Cat

I suspect there are no rules, but some approaches, for some circumstances,
work better than others. Besides, if there were simple, hard rules, some
bright wiz-kid would come up with an automatic application generator and
we'd be out of work!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

Cat Winslow

Jeff, thanks! Comments below...

Jeff Boyce said:
See comments in-line...



If you set a default for a field at the table level, any form you
subsequently base on that field will "inherit" the default setting.

If you set your default on a form, no other forms inherit the setting, and
the field in the table doesn't inherit the setting.

What would work better in your situation?
THAT'S what I thought. Just checking. Have done it both ways...

In my experience (NOTE - JOPO - just one person's opinion) it is much easier
to base any form on a query, rather than on a table. The use of
main-form/sub-form handles one-to-many relationships between the underlying
data (queries/tables/whatever). But if you have so many "manys" related to
your one that you crowd your screen, using a tab control gives you multiple
pages on which you can place those sub-forms.
IT seems to be that I almost always use a query, except in the simplest of
setups. Someone had recommended to me recently that I try just the table link
in my current db, but I couldn't see how it would work.

For what purpose? I suppose I can recall a couple situations in which I
used an invisible text control to "hold" a value I needed to refer to, but
not to save back to the underlying data set.
YES, this is exactly what I meant. I have a subform in which it seems I need
to "hold" a number of field values from the main form, because the subform
has a button that opens a third form that needs that data from the main form.
This is the only way I have been able to get that mainform data into the
sub's popup form. Is it ok to do it that way? Or does that seem like I'm
taking the long (wrong?) way around?
 

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