G
Guest
The following is a partial code that, “Total Access Analyzer†tagged for an
*Error.
Private Sub cmdSaveNew_Click()
Dim iUnitCount As Integer, x As Integer
Dim sqlInsert As String
iUnitCount = mcolSelUnits.Count
For x = 1 To iUnitCount
sqlInsert = "INSERT INTO tblStatus (GuestID, " & _
"UnitID, " & _
"StatusColor, " & _
"ArrivalDate, " & _
"DepartDate) " & _
"VALUES (" & cboGuestID & ", '" _
& mcolSelUnits(x) & "', '" _
& cboStatusType & "', #" _
& mvSelFrom & "#, #" _
& mvSelThru & "#);"
DoCmd.SetWarnings False
DoCmd.RunSQL sqlInsert
DoCmd.SetWarnings True
Next x
Dim frmS As Form
Set frmS = fsubStatus.Form
frmS.Requery
With frmS.RecordsetClone
* .FindFirst "[UnitID] = '" & mcolSelUnits(1) & "'" & _
" AND [ArrivalDate] <= #" & mvSelFrom & "#" & _
" AND [DepartDate] >= #" & mvSelThru & "#"
frmS.Bookmark = .Bookmark
frmS!tabStatus.Value = 0
End With
The error report states, “Form references to undefined procedures; there is
a reference to a procedure that does not exist. [FormMain] Proc
[cmdSavedNewNew_Cclick] calls undefined procedure [FindFirst].
I understand the concept of why; but how does this procedure get defined?
Thanks,
John
*Error.
Private Sub cmdSaveNew_Click()
Dim iUnitCount As Integer, x As Integer
Dim sqlInsert As String
iUnitCount = mcolSelUnits.Count
For x = 1 To iUnitCount
sqlInsert = "INSERT INTO tblStatus (GuestID, " & _
"UnitID, " & _
"StatusColor, " & _
"ArrivalDate, " & _
"DepartDate) " & _
"VALUES (" & cboGuestID & ", '" _
& mcolSelUnits(x) & "', '" _
& cboStatusType & "', #" _
& mvSelFrom & "#, #" _
& mvSelThru & "#);"
DoCmd.SetWarnings False
DoCmd.RunSQL sqlInsert
DoCmd.SetWarnings True
Next x
Dim frmS As Form
Set frmS = fsubStatus.Form
frmS.Requery
With frmS.RecordsetClone
* .FindFirst "[UnitID] = '" & mcolSelUnits(1) & "'" & _
" AND [ArrivalDate] <= #" & mvSelFrom & "#" & _
" AND [DepartDate] >= #" & mvSelThru & "#"
frmS.Bookmark = .Bookmark
frmS!tabStatus.Value = 0
End With
The error report states, “Form references to undefined procedures; there is
a reference to a procedure that does not exist. [FormMain] Proc
[cmdSavedNewNew_Cclick] calls undefined procedure [FindFirst].
I understand the concept of why; but how does this procedure get defined?
Thanks,
John