Populate a field on a FORM based on selected form


G

Guest

I currently have 2 forms created in a rental system. One form is for Rental of Inventory, the other is for the Returning of the Inventory.
Each form, when a new record is added, records a record in a table called Transaction. So, for example, if John Doe rents a TV, then I would go to the Rent Form (This transaction gets recorded in the Transaction Table). When John Doe returns the TV, we go to the Return form and add that record (this record also gets added to the transaction table). SO in the Transaction table, we now have 2 records (1 for the rental, 1 for the rental).

Now, for Report purposes, I would like to include a field in the Transaction table that gives us the option to choose whether the transaction is a Rental OR Return (a simple drop down list). Is there a way that I could make sure that this box automatically fills in as a RENTAL or RETURN based on the form that we have choosen. FOr example, if I want to rent a VCR to Jane Smith, and I go into the Rental Form, then this RENTAL / RETURN field will automatically be filled in with RENTAL. Then when she returns the VCR (Return Form), then the RETURN / RENTAL field automatically gets a value of RETURN.

Thanks,
 
Ad

Advertisements

R

Rick

How are you currently adding a record to your table without specifying
whether it is a rental or return? Are you using positive and negative
quantities, or something?

You should have a field in your table called "TransactionType" or similar.
Add this to your form and make it hidden. Use the default property to set
it to "rental" or "return" based on the form.

HTH
Rick


I currently have 2 forms created in a rental system. One form is for Rental
of Inventory, the other is for the Returning of the Inventory.
Each form, when a new record is added, records a record in a table called
Transaction. So, for example, if John Doe rents a TV, then I would go to the
Rent Form (This transaction gets recorded in the Transaction Table). When
John Doe returns the TV, we go to the Return form and add that record (this
record also gets added to the transaction table). SO in the Transaction
table, we now have 2 records (1 for the rental, 1 for the rental).

Now, for Report purposes, I would like to include a field in the Transaction
table that gives us the option to choose whether the transaction is a Rental
OR Return (a simple drop down list). Is there a way that I could make sure
that this box automatically fills in as a RENTAL or RETURN based on the form
that we have choosen. FOr example, if I want to rent a VCR to Jane Smith,
and I go into the Rental Form, then this RENTAL / RETURN field will
automatically be filled in with RENTAL. Then when she returns the VCR
(Return Form), then the RETURN / RENTAL field automatically gets a value of
RETURN.

Thanks,
 

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