Referenced Boolean

JMichaelM

Registered User.
Local time
Today, 12:41
Joined
Aug 4, 2016
Messages
101
Responsible for making some changes to a database and having difficulty finding reference for the below. Cant find the field which corresponds to the Boolean

Any ideas:

Dim bFS_IMA As Boolean ' IMA File Status
Dim bFS_HPV As Boolean ' HPV File Status

Code:

bFS_HPV = True ' set File Status flag
End If ' CHPVflag = True
' both File Status flages are true
If bFS_IMA And bFS_IMA = bFS_HPV Then
sFileStat = "HIT" ' set File Status value
Else
sFileStat = "MISS" ' set File Status value
End If ' bFS_IMA And bFS_IMA = bFS_HPV
 
find reference to what exactly? I can see you have only supplied part of the code and in what has been supplied bFS_IMA is not assigned a value
 
If [internal] = "IMA" Then
If (CIMA1NF = True) And (CIMA2NF = True) Then
sNum_IMA = "HIT"
bFS_IMA = True ' set File Status flag
End If ' (CIMA1NF = True) And
If CHPVflag = True Then
sNum_HPV = "HIT"
bFS_HPV = True ' set File Status flag
End If ' CHPVflag = True
' both File Status flages are true
If bFS_IMA And bFS_IMA = bFS_HPV Then
sFileStat = "HIT" ' set File Status value
Else
sFileStat = "MISS" ' set File Status value
End If ' bFS_IMA And bFS_IMA = bFS_HPV
End If ' [internal] = "HPV-IMA"
 
Cant find the field which corresponds to the Boolean
so which Boolean are you referring to? There are a number
 
cant find what bFS_IMA and vFS_HPV is linked to on the form. there is no field. Doesnt make sense.
 
When you do a search, be sure you search the project, not the subroutine or the module. If this is a class module, it is possible that you are looking at globals defined in an external general module.

There is no requirement that a variable would always be linked to something on a form.

For example, in my largest project, there are some variables defined by the switchboard form as PUBLIC in a general security module. Forms launched by the switchboard do not have to look up the security information every time because the info is defined via public declaration in a general module. Each form calls the same general module to define the values, but if the module says it has something non-blank in one of the main variables, then the information doesn't need looking up. But if you look only in the individual form, you won't see the definition of the public variables. They are declared elsewhere.
 
Thanks I checked everywhere. I found that some were declared like as follows:

Dim sNum_IMA As String ' Numerator in IMA CIMANF textbox
Dim sNum_HPV As String ' Numerator in HPV CHPVNF textbox

oFrm![CIMANF] = sNum_IMA ' load numerator text box
oFrm![CHPVNF] = sNum_HPV ' load numerator text box
'add combo box code for specs 8.8.16
oFrm![CIMA3NF] = sNum_IMAHPV ' load numerator text box
oFrm![Filestatus] = sFileStat ' load file status
 
in your original post bFS_IMA was dimmed as a Boolean variable - so they would not be in a form.

Don't know about vFS_HPV, it's not in your code. If you mean bFS_HPV, that was dimmed as above.

things become clearer if you indent the code and use the code tags
Code:
 If [internal] = "IMA" Then
 
    If (CIMA1NF = True) And (CIMA2NF = True) Then
        sNum_IMA = "HIT"
        [COLOR=red]bFS_IMA = True[/COLOR] ' set File Status flag
    End If ' (CIMA1NF = True) And
 
    If CHPVflag = True Then
        sNum_HPV = "HIT"
        [COLOR=red]bFS_HPV = True[/COLOR] ' set File Status flag
    End If ' CHPVflag = True
 
        ' both File Status flages are true
    If bFS_IMA And bFS_IMA = bFS_HPV Then
        sFileStat = "HIT" ' set File Status value
    Else
        sFileStat = "MISS" ' set File Status value
    End If ' bFS_IMA And bFS_IMA = bFS_HPV
End If ' [internal] = "HPV-IMA
you can see that bFS_IMA is only set If (CIMA1NF = True) And (CIMA2NF = True), otherwise it remains as null, similar thing happens with bFS_HPV, so it is possible this line

If bFS_IMA And bFS_IMA = bFS_HPV Then

is not working as expected
 
Also found this:

sNum_IMA = "MISS"
sNum_HPV = "MISS"
bFS_IMA = False
bFS_HPV = False
 

Users who are viewing this thread

Back
Top Bottom