2000 to 2003 Conversion Issues

S

Scott Duncan

We are porting our MS Access 2000 application over to 2003. Everything seems
to be going ok so far...

One area that we are having trouble with is the code below. We get a
"Method or Data Member Not found" error on the
"rs.Open strSQL, dbs, 1" Statement.

Not really sure where to turn to see how to correct this.

Any thoughts would be greatly appreciated.


'==== Peek to see if there are any Products that have NOT been Removed From
Inventory
Dim dbs As Object, rs As Recordset
Dim strSQL As String
Dim Box As Integer

' Return reference to current database.
Set dbs = Application.CurrentProject.Connection
' Open Query-type Recordset object.
'====================================================
strSQL = "SELECT [Order Entry Details].[Sales Order Number], [Order
Entry Details].[Qty], [Order Entry Details].[Factory Number],
[Product].[Quantity]"
strSQL = strSQL & " FROM [Order Entry Details] INNER JOIN [Product] ON
([Order Entry Details].[Factory Number] = [Product].[Factory Number])"
strSQL = strSQL & " WHERE [Order Entry Details].[Sales Order Number] ="
& Me![Sales Order Number]
strSQL = strSQL & " And [Product].[Quantity] > 0;"
'====================================================
Set rs = CreateObject("ADODB.Recordset")
rs.Open strSQL, dbs, 1
 
M

Marshall Barton

A2003 went back to DAO as the default data access library.
Check your References to make sure that ADO and DAO are set
as needed.
 
S

Scott Duncan

Thank you !

SD
Marshall Barton said:
A2003 went back to DAO as the default data access library.
Check your References to make sure that ADO and DAO are set
as needed.
--
Marsh
MVP [MS Access]



Scott said:
We are porting our MS Access 2000 application over to 2003. Everything seems
to be going ok so far...

One area that we are having trouble with is the code below. We get a
"Method or Data Member Not found" error on the
"rs.Open strSQL, dbs, 1" Statement.

Not really sure where to turn to see how to correct this.

Any thoughts would be greatly appreciated.


'==== Peek to see if there are any Products that have NOT been Removed From
Inventory
Dim dbs As Object, rs As Recordset
Dim strSQL As String
Dim Box As Integer

' Return reference to current database.
Set dbs = Application.CurrentProject.Connection
' Open Query-type Recordset object.
'====================================================
strSQL = "SELECT [Order Entry Details].[Sales Order Number], [Order
Entry Details].[Qty], [Order Entry Details].[Factory Number],
[Product].[Quantity]"
strSQL = strSQL & " FROM [Order Entry Details] INNER JOIN [Product] ON
([Order Entry Details].[Factory Number] = [Product].[Factory Number])"
strSQL = strSQL & " WHERE [Order Entry Details].[Sales Order Number] ="
& Me![Sales Order Number]
strSQL = strSQL & " And [Product].[Quantity] > 0;"
'====================================================
Set rs = CreateObject("ADODB.Recordset")
rs.Open strSQL, dbs, 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top