This variable CustomerCode looks to me like something that is in a table but ..
My advice, make use of Datamodules. Put your tables and querys on the Datamodules and and also every global variable you want to use somewhere in your program.
The Datamodule is a container for non visual components like tables, datasources, imagelists, stringlists and your own non-visual variables. Steven van Els
SAvanEls@cq-link.sr