Insert passed field from another form into record

Gavx

Registered User.
Local time
Today, 18:17
Joined
Mar 8, 2014
Messages
155
My intention is to pass data from one form to another.

I have a form (fmTransactions) based on a table (tblTransactions) with an index located in the field TransID.

I have another form (fmRental) based on a query that is filtered by the value in TransID from fmTransactions. Note the index TransID is foreign key in tblRental.

The problem is that if the TransID does not exist in tblRental, the entering of data into fmRental does not automatically record TransID into tblRental.

How can I fix this?

thanks
 
If you were to make frmRentals a subform of tblTransactions, and set the child parent properties, it would automatically create an appropriate new record.

If that isn't possible / sensible, then you can pass a value using the OpenArgs property of the OpenForm command, and then inspect that on form load event of the newly opened form, and if necessary create a new record based on that.
 

Users who are viewing this thread

Back
Top Bottom