[AccessD] I do not understand this

Gustav Brock Gustav at cactus.dk
Thu Mar 24 08:42:47 CST 2005


Hi Joe

I had a look again, I hadn't noticed this is a report.
Could it happen that SmpleSizePieces is both a field and a textbox?
Can SmpleSizePieces contain an empty string?

Try this:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.SmpleSizeAll.Value = True Then
      Me.txtSmplSize = "All Pieces"
    Else
      If Me.SmpleSizePieces.Value <> 0 Then
        Me.txtSmplSize = "Samples: " & Me.SmpleSizePieces
      Else
        Me.txtSmplSize = "No Samples Needed"
      End If
    End If
End Sub

/gustav

>>> jmhla at earthlink.net 03/24 8:01 am >>>
I built the following code using the autocomplete in the VB editor.
Why
can't Access find the smpleSizeAll in the code?
 
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.SmpleSizeAll.Value = True Then
    Me.txtSmplSize = "All Pieces"
        Else
    If Me.SmpleSizePieces.Value <> 0 Then
    Me.txtSmplSize = Me.SmpleSizePieces
        Else
    Me.txtSmplSize = "No Samples Needed"
 End If
 End If
 
    
End Sub




More information about the AccessD mailing list