stnkyminky
Programmer
I am attempting to use classes in a new project I'm working on.
I have a class called clsAdd. In clsAdd I store information about individual shipments, PO#'s, Addys, etc.
I instantiate a reference to clsAdd in a form called frmMain.
In frmMain I call a function in ClsAdd called PopulateFields. PopulateFields queries the DB and stores the individual results in the variables defined in ClsAdd. Once PopulateFields is complete the focus goes back to frmMain which does some other things then loads a form call frmAdd, which shows the result of the query.
frmAdd's Form_Load Event contains a reference to clsAdd and attempts to retrieve the values of clsAdd's variables and assign then to text boxes. When trying to assign the values to the text boxes, nothing is in the clsAdd variables.
What am I doing wrong? Scott
Programmer Analyst
I have a class called clsAdd. In clsAdd I store information about individual shipments, PO#'s, Addys, etc.
I instantiate a reference to clsAdd in a form called frmMain.
In frmMain I call a function in ClsAdd called PopulateFields. PopulateFields queries the DB and stores the individual results in the variables defined in ClsAdd. Once PopulateFields is complete the focus goes back to frmMain which does some other things then loads a form call frmAdd, which shows the result of the query.
frmAdd's Form_Load Event contains a reference to clsAdd and attempts to retrieve the values of clsAdd's variables and assign then to text boxes. When trying to assign the values to the text boxes, nothing is in the clsAdd variables.
What am I doing wrong? Scott
Programmer Analyst