T
tcb
1) When dimensioning variables in VB, is there a best practice as to
length of variable name? I tend to use long/descriptive names (see
below).
2) Is there a better way to empty variables than what I am doing below
(strVariable = "")? Is there a function to clear them all without
referring to them individually? My variables are delcared in
Declarations because I use them in many of the form's sub routines.
Option Compare Database
Option Explicit
Dim varItem As Variant
Dim booItemYes As Boolean
Dim dbAppendQueryTo As Database
Dim strSELECT As String
Dim strSELECTb As String
Dim strFROM As String
Dim strFROMb As String
Dim strWhere As String
Dim strWhereb As String
Dim strORDERBY As String
Dim strQueryName As String
Dim strSQL As String
Dim strSQLb As String
Dim strWhere1 As String
Dim strWhereSemYearEnt As String
Dim strWhereCurrentStatus As String
Dim strWhereDegreeDesired As String
Dim strWhereConcentration As String
Dim strWhereJointDegree As String
Dim strWhereEthnicity As String
Dim strWhereDegreeTracking As String
Dim strWhereDegProgStatus As String
Dim strWhereState As String
Dim strWhereDeceased As String
Dim strWhereDoNotContact As String
Dim strWhereINTL As String
Dim strWhereMinority As String
Dim strDescrip As String 'Description of WhereCondition
Dim lngLen As Long 'Length of string
Dim strDelim As String 'Delimiter for this field type.
Dim strDoc As String 'Name of report to open.
Private Sub doCreateQuery()
strWhere = ""
strWhereb = ""
strFROM = ""
strSELECT = ""
strSELECTb = ""
strSQL = ""
strFROMb = ""
strSQLb = ""
strQueryName = ""
strWhereSemYearEnt = ""
strWhereCurrentStatus = ""
strWhereDegreeTracking = ""
strWhereDegProgStatus = ""
strWhereDegreeDesired = ""
strWhereConcentration = ""
strWhereJointDegree = ""
strWhereEthnicity = ""
strWhereState = ""
strWhereDeceased = ""
strWhereDoNotContact = ""
strWhereINTL = ""
strWhereMinority = ""
strORDERBY = ""
'then create query
length of variable name? I tend to use long/descriptive names (see
below).
2) Is there a better way to empty variables than what I am doing below
(strVariable = "")? Is there a function to clear them all without
referring to them individually? My variables are delcared in
Declarations because I use them in many of the form's sub routines.
Option Compare Database
Option Explicit
Dim varItem As Variant
Dim booItemYes As Boolean
Dim dbAppendQueryTo As Database
Dim strSELECT As String
Dim strSELECTb As String
Dim strFROM As String
Dim strFROMb As String
Dim strWhere As String
Dim strWhereb As String
Dim strORDERBY As String
Dim strQueryName As String
Dim strSQL As String
Dim strSQLb As String
Dim strWhere1 As String
Dim strWhereSemYearEnt As String
Dim strWhereCurrentStatus As String
Dim strWhereDegreeDesired As String
Dim strWhereConcentration As String
Dim strWhereJointDegree As String
Dim strWhereEthnicity As String
Dim strWhereDegreeTracking As String
Dim strWhereDegProgStatus As String
Dim strWhereState As String
Dim strWhereDeceased As String
Dim strWhereDoNotContact As String
Dim strWhereINTL As String
Dim strWhereMinority As String
Dim strDescrip As String 'Description of WhereCondition
Dim lngLen As Long 'Length of string
Dim strDelim As String 'Delimiter for this field type.
Dim strDoc As String 'Name of report to open.
Private Sub doCreateQuery()
strWhere = ""
strWhereb = ""
strFROM = ""
strSELECT = ""
strSELECTb = ""
strSQL = ""
strFROMb = ""
strSQLb = ""
strQueryName = ""
strWhereSemYearEnt = ""
strWhereCurrentStatus = ""
strWhereDegreeTracking = ""
strWhereDegProgStatus = ""
strWhereDegreeDesired = ""
strWhereConcentration = ""
strWhereJointDegree = ""
strWhereEthnicity = ""
strWhereState = ""
strWhereDeceased = ""
strWhereDoNotContact = ""
strWhereINTL = ""
strWhereMinority = ""
strORDERBY = ""
'then create query