[AccessD] Naming Conventions

Dan Waters dwaters at usinternet.com
Thu Aug 12 16:51:07 CDT 2004


I've tried so hard to stay out of this, but . . .

This is a function I'm using in a process module call Six Sigma Projects
(SSP).  It's abbreviated SSP because it is explicitly titled this way.  I
also used the abbreviation CBA for Cost Benefit Analysis because the fields
are labeled this way.  There are no other abbreviations!  Can everyone read
this?????


Private Function ReadyMeasure() As Boolean
'on error GoTo EH

    Dim blnMeasurePlan As Boolean
    Dim blnMeasureResults As Boolean

    ReadyMeasure = True

    If (IsNull(memCBACurrent) Or memCBACurrent = "") And
IsNull(txtFileTitleCBACurrent) Then
        butAttachFileCBACurrent.SetFocus
        FormattedMsgBox GstgNotReady, "The CBA Current information is
missing." & vbCrLf & vbCrLf & "Attach a file or fill in the CBA Current
field.@ @", vbOKOnly, "Missing Information"
        ReadyMeasure = False
        Exit Function
    End If

    If SSPFileExists("Measure Plan") Then
        blnMeasurePlan = True
    Else
        blnMeasurePlan = False
    End If

    If (IsNull(memMeasurePlan) Or memMeasurePlan = "") And blnMeasurePlan =
False Then
        memMeasurePlan.SetFocus
        FormattedMsgBox GstgNotReady, "The Measure Plan field" & vbCrLf &
vbCrLf & "or a Measure Plan file is required.@ @", vbOKOnly, "Missing
Information"
        ReadyMeasure = False
        Exit Function
    End If

    If SSPFileExists("Measure Results") = True Then
        blnMeasureResults = True
    Else
        blnMeasureResults = False
    End If

    If (IsNull(memMeasureData) Or memMeasureData = "") And blnMeasureResults
= False Then
        memMeasureData.SetFocus
        FormattedMsgBox GstgNotReady, "The Measure Results field" & vbCrLf &
vbCrLf & "or a Measure Results file is required.@ @", vbOKOnly, "Missing
Information"
        ReadyMeasure = False
        Exit Function
    End If

    If IsNull(txtDateAnalyzePlannedFinish) Then
        txtDateAnalyzePlannedFinish.SetFocus
        FormattedMsgBox GstgNotReady, "The Analyze Planned Finish Date field
is required.@ @", vbOKOnly, "Missing Information"
        ReadyMeasure = False
        Exit Function
    End If

    If IsNull(cboBlackBeltMeasure) Then
        cboBlackBeltMeasure.SetFocus
        FormattedMsgBox GstgNotReady, "The Black Belt field is required.@
@", vbOKOnly, "Missing Information"
        ReadyMeasure = False
        Exit Function
    End If

    If IsNull(cboMasterBlackBeltMeasure) And Not
IsNull(cboMasterBlackBeltSetup) Then
        cboMasterBlackBeltMeasure.SetFocus
        FormattedMsgBox GstgNotReady, "The Master Black Belt field is
required.@ @", vbOKOnly, "Missing Information"
        ReadyMeasure = False
        Exit Function
    End If

    If IsNull(cboFinanceMeasure) And Not IsNull(cboFinanceSetup) Then
        cboFinanceMeasure.SetFocus
        FormattedMsgBox GstgNotReady, "The Finance field is required.@ @",
vbOKOnly, "Missing Information"
        ReadyMeasure = False
        Exit Function
    End If

    If IsNull(cboProcessOwnerMeasure) And Not IsNull(cboProcessOwnerSetup)
Then
        cboProcessOwnerMeasure.SetFocus
        FormattedMsgBox GstgNotReady, "The Process Owner field is required.@
@", vbOKOnly, "Missing Information"
        ReadyMeasure = False
        Exit Function
    End If

    If IsNull(cboChampionMeasure) And Not IsNull(cboChampionSetup) Then
        cboChampionMeasure.SetFocus
        FormattedMsgBox GstgNotReady, "The Champion field is required.@ @",
vbOKOnly, "Missing Information"
        ReadyMeasure = False
        Exit Function
    End If

    Exit Function

EH:
    Application.Echo True
    Call GlobalErrors(txtSSPID, Err.Number, Err.Description, "frmSSPMain",
"ReadyMeasure")

End Function

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia
Sent: Thursday, August 12, 2004 4:07 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Naming Conventions

DWUTKA at marlow.com wrote On 8/11/2004 1:40 PM:

>These are the after effects of someone's 'deemed' best practices.  If I had
>a contract job, like the one you discussed below, I would do as the client
>asked.  But when developing other software, which did not have such client
>restraints, then I would use the method that I work the fastest in, and
find
>the most convenient to use.  That saves my clients time and money.
>
>It's not lazy, in fact, you could say that you're being lazy, in applying
>one clients 'demands' on all of your clients, so that you don't have to
>change mindsets. <Grin>
>  
>
While everyone on the list will agree that i, l and k are all simply just
integer or long counters, and could be used interchangeably... it also isn't
a big deal to be explicit and say lngRankCnt or lngRankCount, the fact that
it took you all of a .001 seconds to type out the extra characters is
negligable... and in fact when reviewing your code for logic you'd spot the
variable name and explicitly know what the heck it was ment to do.

-- 
-Francisco


-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list