Quantcast
Channel: Tech Support Guy
Viewing all articles
Browse latest Browse all 38405

Missing Reference

$
0
0
I inherited a database that I think is looking for a missing reference, I get a message stating that the sub or function is not defined. Here is the code (Not sure what Nstr is), can anyone help?:

Private Sub Form_Current()
' Special VineCount Handling (No Longer Needed - 12/2/2004)

Dim X As Integer, XL As Long
Dim W As String
Dim strMsg As String
Dim Criteria As String
Dim idsFuncName As String
Dim FieldCode As String
Dim RowsWorked As String
Dim Special As Variant

idsFuncName = "Time Card Input: FormCurrent"

' Not Needed 12/2/2004
Exit Sub

FieldCode = Nstr(Me.txtFieldCode)
RowsWorked = Trim(Nstr(Me.txtRowsWorked))

' Any Data
If Len(FieldCode) = 0 Or Len(RowsWorked) = 0 Then
Exit Sub
End If

' Special Row Handling
X = InStr(RowsWorked, "-")
If X = 0 Then
Criteria = "[FieldCode] = '" & FieldCode & "'"
Criteria = Criteria & " AND [Row] = " & RowsWorked
Special = DLookup("[Special]", "tblFieldDetail", Criteria)
If Special = "Y" Then
Me.txtVineCount.Enabled = True
Me.txtVineCount.Locked = False
End If
Else
Me.txtVineCount.Enabled = False
Me.txtVineCount.Locked = True
End If

End Sub

Viewing all articles
Browse latest Browse all 38405

Trending Articles