How to clear memory in Access

P

Paul

I assign the value of some of the controls in a form to the memory (global
variable) in the module. The value save in the memory is the combination of
various datatype like date/time, integer, long and string etc. I want to
clear all the values in the memory when closing the form. How to clear the
memory without ree-assigning each varoiables to zero, vbNullString or
empty. Can I achieve it in one line of coding? However I can not set the
"date/time", "currency", "Integer" to null.

Option Compare Database
Option Explicit

Public Type OldValue

OldQuantity As Integer
OldComment As String
PurchaseDate As Date
PurchaseInvoiceNumber As Integer
PurchaseLocation As String
PurchasePotSize As String
PurchaseUserNotes As String
PurchaseStockNumberNotes As String
PurchaseQuantity As Integer
PurchaseUnitPrice As Currency
End Type

Public Old As OldValue
 
Top