Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing arrays from a different form 1

Status
Not open for further replies.
May 20, 2005
24
GB
I have a form set up as follows:
The main form contains header information
There is a subform which contains line information.

I create a new job in the main form and then add separate lines using the subform. The subform only shows one line at a time and clears when I click a button "Add a new line". The line information is stored in an array in the subform.

When all the lines have been entered, clicking another button (which is contained within the subform) launches a preview form containing the header information and each line. Clicking "OK" on this will send out an email containing this information.

When I click "OK" to send out the email, I want to clear the line information from the array in the subform. Please can someone suggest how do I do this? I have tried declaring the array as Public but the compiler will not let me.
 
Declare the array as Public in the Declarations section of a standard code module.
Another way is to declare it as Public in the Declarations section of the subform code module and so the array may be accessed as a property of the Form object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top