Defining Prodecures

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
John said:
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?


It sounds like you do not have a reference to the DAO
library.

Did you intend to use the ADO library instead? If so, then
you need to use its Find method. If not, remove the
reference to the ADO library and add the DAO library
reference.
 
I have version 11.00.0019

John

RobFMS said:
John

Which version of Analyzer are you using? Have you downloaded the latest
updates for that version?
Go to: http://www.fmsinc.com/free/updates/analyzer.htm

If an update is available, apply it and then run the process again to see if
the same error occurs.

Rob Mastrostefano


--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


John Phelan said:
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
 
I have a reference to, "Microsoft DAO 3.6 Object Library"

John

Marshall Barton said:
John said:
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?


It sounds like you do not have a reference to the DAO
library.

Did you intend to use the ADO library instead? If so, then
you need to use its Find method. If not, remove the
reference to the ADO library and add the DAO library
reference.
 
That is the latest update. Are you still experiencing an issue on this
topic?

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


John Phelan said:
I have version 11.00.0019

John

RobFMS said:
John

Which version of Analyzer are you using? Have you downloaded the latest
updates for that version?
Go to: http://www.fmsinc.com/free/updates/analyzer.htm

If an update is available, apply it and then run the process again to see
if
the same error occurs.

Rob Mastrostefano


--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


John Phelan said:
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
 
Just a guess, John, but what if you were to explicitly assign RecordsetClone
to a DAO Recordset object ...

Dim rst As DAO.Recordset

Set rst = frmS.RecordsetClone
With rst
.FindFirst "[UnitID] = '" & mcolSelUnits(1) & "'" & _

--
Brendan Reynolds

John Phelan said:
I have a reference to, "Microsoft DAO 3.6 Object Library"

John

Marshall Barton said:
John said:
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?


It sounds like you do not have a reference to the DAO
library.

Did you intend to use the ADO library instead? If so, then
you need to use its Find method. If not, remove the
reference to the ADO library and add the DAO library
reference.
 
Yes I am still experiencing the same issue. As I said below I have the
latest version. I have version 11.00.0019. I have been using it since it
first came out. Is there a newer one?.

John


RobFMS said:
That is the latest update. Are you still experiencing an issue on this
topic?

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


John Phelan said:
I have version 11.00.0019

John

RobFMS said:
John

Which version of Analyzer are you using? Have you downloaded the latest
updates for that version?
Go to: http://www.fmsinc.com/free/updates/analyzer.htm

If an update is available, apply it and then run the process again to see
if
the same error occurs.

Rob Mastrostefano


--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


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
 
John

That is the latest one.

I also posted this on our FMS Newsgroups:

Is "cmdSavedNewNew_Cclick" a typo? This does not match the subprocedure you
have listed.

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


John Phelan said:
Yes I am still experiencing the same issue. As I said below I have the
latest version. I have version 11.00.0019. I have been using it since it
first came out. Is there a newer one?.

John


RobFMS said:
That is the latest update. Are you still experiencing an issue on this
topic?

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


John Phelan said:
I have version 11.00.0019

John

:

John

Which version of Analyzer are you using? Have you downloaded the
latest
updates for that version?
Go to: http://www.fmsinc.com/free/updates/analyzer.htm

If an update is available, apply it and then run the process again to
see
if
the same error occurs.

Rob Mastrostefano


--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


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
 
I include the following two references:

Microsoft DAO 3.6 Object Library
Microsoft ADO Ext. 2.8 for DDL and Security

I need the ADO in order to connect my application to the backend.

John



Marshall Barton said:
John said:
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?


It sounds like you do not have a reference to the DAO
library.

Did you intend to use the ADO library instead? If so, then
you need to use its Find method. If not, remove the
reference to the ADO library and add the DAO library
reference.
 
Right. In that case you must have ADO higher in the
referene list than DAO. That means that an unqualified
declaration will be an ADO recordset.

Do what Brendan said and explicitly disambiguate evnery
object that occurs in both libraries. Actually, to be
really safe, you should qualify all objects in both
libraries.
--
Marsh
MVP [MS Access]


John said:
I include the following two references:

Microsoft DAO 3.6 Object Library
Microsoft ADO Ext. 2.8 for DDL and Security

I need the ADO in order to connect my application to the backend.

John said:
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?

Marshall Barton said:
It sounds like you do not have a reference to the DAO
library.

Did you intend to use the ADO library instead? If so, then
you need to use its Find method. If not, remove the
reference to the ADO library and add the DAO library
reference.
 
Yes it is a typo, but only in this posting (hmm, strange, blush, blush). In
my code (I doubled-checked it), it is indeed, "cmdSaveNew_Click()".

John


RobFMS said:
John

That is the latest one.

I also posted this on our FMS Newsgroups:

Is "cmdSavedNewNew_Cclick" a typo? This does not match the subprocedure you
have listed.

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


John Phelan said:
Yes I am still experiencing the same issue. As I said below I have the
latest version. I have version 11.00.0019. I have been using it since it
first came out. Is there a newer one?.

John


RobFMS said:
That is the latest update. Are you still experiencing an issue on this
topic?

Rob Mastrostefano

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


I have version 11.00.0019

John

:

John

Which version of Analyzer are you using? Have you downloaded the
latest
updates for that version?
Go to: http://www.fmsinc.com/free/updates/analyzer.htm

If an update is available, apply it and then run the process again to
see
if
the same error occurs.

Rob Mastrostefano


--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com


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
 
While I certainly agree that disambiguating is a good idea when both
references are present, that's not exactly what I was getting at in this
case. The reason I suggested explicitly assigning the RecordsetClone
property to a DAO.Recordset variable is that the return type of the
RecordsetClone property is neither DAO.Recordset nor ADODB.Recordset, but
Object. I'm guessing that this is why Analyzer is warning that the procedure
does not exist - the Object class does not have a FindFirst method.

I could be wrong, of course, but it would only take a minute or two to test
it. I'd test it myself but I don't have Analyzer installed on this PC.

--
Brendan Reynolds

Marshall Barton said:
Right. In that case you must have ADO higher in the
referene list than DAO. That means that an unqualified
declaration will be an ADO recordset.

Do what Brendan said and explicitly disambiguate evnery
object that occurs in both libraries. Actually, to be
really safe, you should qualify all objects in both
libraries.
--
Marsh
MVP [MS Access]


John said:
I include the following two references:

Microsoft DAO 3.6 Object Library
Microsoft ADO Ext. 2.8 for DDL and Security

I need the ADO in order to connect my application to the backend.

John Phelan wrote:
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?

Marshall Barton said:
It sounds like you do not have a reference to the DAO
library.

Did you intend to use the ADO library instead? If so, then
you need to use its Find method. If not, remove the
reference to the ADO library and add the DAO library
reference.
 
Back
Top