Hi,
I'm just starting out as a VB & Access programmer. I have plenty of programming experience just not in these languages so to speak.
I have a form with a "Record Source" of "Trade".
On this form there is also a Subform with a "Record Source" called "Exit"
It is a one to many relationship. One Trade to many Exits.
In Form View, the form shows the selected Trade row and the filtered exits ie where Exit.Trade_ID = Trade.Trade_ID.
I have a button on the Trade form and I need some code that will perform some calculations and update both the Trade table and Exit table.
As an example in pseudo code of the Trade table row update -
Given that the form/s already have the tables open, do I need to create new variables and connections to the database or can I reference these already?
Thanks,
Neil.
I have bought some books on these but!!! Is it my age or the book
It's just not clicking.
I'm just starting out as a VB & Access programmer. I have plenty of programming experience just not in these languages so to speak.
I have a form with a "Record Source" of "Trade".
On this form there is also a Subform with a "Record Source" called "Exit"
It is a one to many relationship. One Trade to many Exits.
In Form View, the form shows the selected Trade row and the filtered exits ie where Exit.Trade_ID = Trade.Trade_ID.
I have a button on the Trade form and I need some code that will perform some calculations and update both the Trade table and Exit table.
As an example in pseudo code of the Trade table row update -
Code:
Trade.Profit = 0;
While Not Exit.EOF AND Exit.Trade_ID = Trade.Trade_ID
Trade.Profit = Trade.Profit + Exit.Price-Trade.Entry
Given that the form/s already have the tables open, do I need to create new variables and connections to the database or can I reference these already?
Thanks,
Neil.
I have bought some books on these but!!! Is it my age or the book

It's just not clicking.