Hideing Uneeded Fields in a form Via Check Box?

  • Thread starter Thread starter CPOconllo
  • Start date Start date
C

CPOconllo

I have a form that contains Multiple fields, Example Pick up address, Drop
off address.

However there are times when multiple pick up and drop of address are needed
is there any way like with a check box that once it is checked it would
expand the form to show the additional fields and or that the additional
fields remain hidden when not checked.

I have looked around and have not found this asked, or even explianed if it
were even possible to do this, if so please point in the right direction

Thanks in advance
 
how are you *storing* the data? if you have multiple sets of address fields
in your table, you need to rethink your table design. a record with possible
multiples of specific data or data sets should be split into multiple
tables: a parent table holding the "single record" data, and a child table
to hold the related data set(s) - one record for each data set (in this
case, one record for each address, probably with a field to designate the
address record as Pickup or Dropoff).

having set up a one-to-many relationship between the two tables, you can
then create a mainform bound to the "single record" data table, with a
subform bound to the child table of addresses. each address is added as a
new record in the subform; there is no need for multiple sets of controls to
show and hide, just one set of controls bound to the address fields in the
child table.

suggest you read up on relational design so you can optimize your
tables/relationships structures. for more information, see
http://home.att.net/~california.db/tips.html#aTip1.

hth
 
Well it was more for reducing the cluter on the form it self, as you might
have imagined from my descriptions it's for a transport company so a great
majority of the time having multiple pick up and drop off address listed will
not be the case.

But there are times when a client needs product picked up a multi address
and even droped off to multi address, so the ability to remove the cluter
from the form when the need for Multi was not present.

But I do understand however what you mean by creating child tables for the
host to maintain those additional pick/drop, so if I have 2 additional drop
off's fields do you meen then that I need to create a table for each
additional groups "address 2, city2, zip2 etc etc in one table and the same
for the third group?

Also the child tables I create a relationship with the host via ID, also I
was able to figure out making these fields non visible by setting visible to
no using command button or option with me.buttonname.Visible = true on click
event and then double click event settting to false.
 
But I do understand however what you mean by creating child tables for the
host to maintain those additional pick/drop, so if I have 2 additional drop
off's fields do you meen then that I need to create a table for each
additional groups "address 2, city2, zip2 etc etc in one table and the same
for the third group?

re-read my reply, hon. the related child data is addresses, and they need to
be stored in a single child table - it doesn't matter if there is one
address for a single parent record, or 20 addresses, or 500. they all go in
one addresses table, related back to the parent table. i strongly urge you
to study relational design principles; Access was designed on those
principles, and you're going to have a lot of problems working with it if
you don't understand and employ those principles in your database structure.
again, that link to get you started is
http://home.att.net/~california.db/tips.html#aTip1.
good luck with it.

hth
 
Back
Top