Hello friends,
i have a weird problem.
I created a UDT as PUBLIC in a module (PublicTypes.bas).
i use it in a form (FillApp.frm), through a "CollectData()" private sub to collect user inputs...Code:Public Type tApplication ID As Long Kid_ID As Long Period_id As Long Appl_Date As Date Comments As String Approved As Byte Income As Currency Garden() As Long End Type
and i have declare it as shown below
then i pass the vApplication variable to another public sub, in another module (DB_Application.bas)...Code:Option Explicit Private vApplication As tApplication
... in order to save to database.Code:Public Function SaveApplication(ByRef p As tApplication) As Byte
Works very well for the first time i open the form (FillApp.frm)
but when i unload it and re-opened it, the variable vApplication has not be re-initialized,
but contains the data from the last use of the form.
Why this is happening?
I want the variable to initialize at default values every time i open the FillApp.frm
Thank you a lot




Reply With Quote
