subform or hidden fields.....i'm confused???

P

p-rat

I have a form where I collect data for Truck Tickets. The trucks
carry
a load to a site. Up until now we have one ticket (or one record) per
truck per site. Now there is a requirement to where there might be
one
truck ticket, but there could be multiple sites where the truck
drops.

I thought, if possible, to have a check box or something on my form
where the label is 'multiple site ticket' and if checked have a
subform or some other wise hidden fields appear to enter in this
extra
data. The extra or multiple site data must stay with the Truck
Ticket.


I didn't know if someone might have a simple and effective way to
attack this issue. If anyone could help...please do. I need it.
Thanks.
 
T

Tom van Stiphout

On Fri, 5 Dec 2008 19:07:09 -0800 (PST), p-rat <[email protected]>
wrote:

To me it seems that a single site drop is just a special case of a
multi-site drop (one record vs. multiple), so I would handle it all in
the same (sub-)form.

-Tom.
Microsoft Access MVP
 
M

Mike Painter

p-rat said:
I have a form where I collect data for Truck Tickets. The trucks
carry
a load to a site. Up until now we have one ticket (or one record) per
truck per site. Now there is a requirement to where there might be
one
truck ticket, but there could be multiple sites where the truck
drops.

I thought, if possible, to have a check box or something on my form
where the label is 'multiple site ticket' and if checked have a
subform or some other wise hidden fields appear to enter in this
extra
data. The extra or multiple site data must stay with the Truck
Ticket.


I didn't know if someone might have a simple and effective way to
attack this issue. If anyone could help...please do. I need it.
Thanks.

Stick with the subform.
There is no point hiding it and doing so will cause problems if someone does
not know there are extra deliveries.

There is also a basic flaw with you idea of fields and "extra fields" on a
main form.
Any time you have fields something like delivery1, delivery2, delivery3 in
a relational database you ask for problems.
They can only be solved by coding and that cause more problems.
Then a joker says "I made four deliveries today."
 
P

p-rat

So does the sub-form link to the main form? I need the multiple
deliveries to be linked to the main Truck Ticket. I haven't done a sub-
form (I'm new to this). How do I open and close the form? Thanks for
your help.
 
M

Mike Painter

The subform opens and closes with the main form.
The Northwind Database has examples and there is information in help.
You can build one in a variety of ways, one of which is just to drop the
subform on the main form.
You link them throught the master child property on the sub form. If you
establish the relationship before hand this will be filled in for you.
 

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

Similar Threads


Top