Form Referencing
-
I am making a VB project for a class I am taking. It involves using databases in Access. My primary key is called "CustID" I am making a project for a company that sells sports cards on online auctions. My first form is a Customer information page. What I need to do is add the "CustID" number that is loaded and have it transfer onto the Order Information page. My instructor mentioned referencing the form, but I wasnt quite sure what he meant. PLEASE HELP ASAP :omg: Thanks much Pat de Wah
-
I am making a VB project for a class I am taking. It involves using databases in Access. My primary key is called "CustID" I am making a project for a company that sells sports cards on online auctions. My first form is a Customer information page. What I need to do is add the "CustID" number that is loaded and have it transfer onto the Order Information page. My instructor mentioned referencing the form, but I wasnt quite sure what he meant. PLEASE HELP ASAP :omg: Thanks much Pat de Wah
If you have two forms, FA and FB, then you can directly reference FB from FA and Vice versa. I would suggest implementing method like UpdateCustID(ByVal NewCustID) on FB, which can then be called from FA:
load FB FB.UpdateCustID(NewCustIDFromThisForm) FB.Show Unload Me
Note that it's not necessary to load FB first - if you reference a form, then it gets loaded implicitly anyway, but I always tend to do so, since makes the code a little clearer "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox