G
Guest
I added two fields (FuelPuchased and FuelPrice) to an existing table
(Expenses). The database was previously built and working properly. The
Primary Key for Expenses is ExpenseID.
On the form (frmExpenses) that was already built, I added a command button
to open a new form (frmFuelExpenses) where the user adds fuel purchased data.
After entering the data, I use the After_Update property to manipulate the
data to send some of it to the frmExpenses in a certain format. But, I also
keep the Fuel data that was added to the frmFuelExpenses to get stored with
the Expenses table in the newly added fields.
What is happening is the fuel expense data is getting saved to the first
record in the Expenses table. I tried setting the control source for the
ExpenseID on the frmFuelExpenses = Forms!frmExpenses.ExpenseID and it does
indeed show the correct ExpenseID when the frmFuelExpenses open, but the data
still gets saved to the first record in the Expenses table.
Any help to get the data saved to the correct record would be appreciated.
(Expenses). The database was previously built and working properly. The
Primary Key for Expenses is ExpenseID.
On the form (frmExpenses) that was already built, I added a command button
to open a new form (frmFuelExpenses) where the user adds fuel purchased data.
After entering the data, I use the After_Update property to manipulate the
data to send some of it to the frmExpenses in a certain format. But, I also
keep the Fuel data that was added to the frmFuelExpenses to get stored with
the Expenses table in the newly added fields.
What is happening is the fuel expense data is getting saved to the first
record in the Expenses table. I tried setting the control source for the
ExpenseID on the frmFuelExpenses = Forms!frmExpenses.ExpenseID and it does
indeed show the correct ExpenseID when the frmFuelExpenses open, but the data
still gets saved to the first record in the Expenses table.
Any help to get the data saved to the correct record would be appreciated.