Repeating Code

q582gmzhi

Registered User.
Local time
Today, 22:24
Joined
Dec 23, 2002
Messages
48
Hi,

I am using the following code quite a few times and across three forms.

Dim ScorePoint As Byte
Dim Score As Integer

Can I use a Global or Constant to specify the type instead of having the same code numerous times throughout the db?

Thanks

Daz....
 
Daz,

You can make a new Module and put their definitions in it:

Public ScorePoint As Byte
Public Score As Integer

Their values will be available to all forms/reports in your
application. BUT, if you encounter unhandled errors, they
tend to lose their values.

Additionally, if you have any code that repeats, you can make
Public Subroutines/Functions out of them.

Wayne
 

Users who are viewing this thread

Back
Top Bottom