3 Replies - 5342 Views - Last Post: 17 April 2013 - 02:08 PM

#1 Roemeo  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 153
  • Joined: 08-December 08

creating a second record set?

Posted 17 April 2013 - 12:47 PM

I created my first record set to query from the customer table and it works perfect but when i add a second record set it gives me an error any info would be greatly appreciated. Code Below

Option Compare Database
    Dim db As ADODB.Connection
    Dim rstCustomer As New ADODB.Recordset
    Dim rstNewOrder As New ADODB.Recordset
    
    
    Private Sub form_load()

    Set db = CurrentProject.Connection
    rstCustomer.Open "select * from queryCustomer", db, adOpenKeyset, adLockOptimistic, adCmdText
    rstNewOrder.Open "select * from queryNewOrder", db, adOpenKeyset, adLockOptimistic, adCmdText 'error here
    browseState
   

End Sub


Is This A Good Question/Topic? 0
  • +

Replies To: creating a second record set?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9363
  • View blog
  • Posts: 35,172
  • Joined: 12-June 08

Re: creating a second record set?

Posted 17 April 2013 - 12:53 PM

... so what's the error message?
Was This Post Helpful? 0
  • +
  • -

#3 Roemeo  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 153
  • Joined: 08-December 08

Re: creating a second record set?

Posted 17 April 2013 - 12:56 PM

View Postmodi123_1, on 17 April 2013 - 01:53 PM, said:

... so what's the error message?


Attached Image

then it highlights the second recordset newOrder

This post has been edited by Roemeo: 17 April 2013 - 12:57 PM

Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3593
  • View blog
  • Posts: 12,360
  • Joined: 12-December 12

Re: creating a second record set?

Posted 17 April 2013 - 02:08 PM

It is most likely that "queryNewOrder" is a parameter query or it contains a misspelt table or column name.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1