retrieving information

  • Thread starter Thread starter administrator
  • Start date Start date
A

administrator

I have four tables. The main table "Tickets" sets an ID
number (one in the relationship) and the
tables "Discounts" "Tickets Sold" and "Cash on Hand" have
the ID as a many side of the relationship. Currently the
user enters the "Tickets" information and using a command
button goes to any of the other three forms. For example,
on the tickets form we would enter "emp" "currentdate"
and "bankdate" and then go to discounts form to enter how
many of each discount was used. The form for discounts
has controls that gives the
current "TBLTickets.id" "TBLTickets.emp" "TBLTickets.curren
tdate" and "TBLTIckets.bankdate" so the user will know
they are entering the correct discounts.id to the
tbltickets.id. FYI, the id fields are set to Index Yes No
duplicates.

The problem ... if the user returns to the Tickets form,
wants to then go again to the discounts form (maybe to
correct an entry), the discounts form is empty. They
could then at that point, reenter data and have two sets
of the same info.

The question ... How can I set it on forms, so that when
the user goes to a form, if the TBLTickets.id already has
a TBLDiscounts.id (whichever form the user is revisiting),
the information is retrieved. I hope this makes sense.
 
You really should look at setting up the entry for Discounts, Sold and Cash
as subforms on the main form. This would allow any related records to always
be shown and available to the user without having to bail out to a second
form.

The other way is to use the Where section of the OpenForm method to specify
with TicketID to open the form too.

Gary Miller
 
Back
Top