troubleshooting Question

converting From DAO to ADO - need help

Avatar of KateXS
KateXS asked on
Microsoft Access
5 Comments1 Solution567 ViewsLast Modified:
I have code that works in DAO - I need to convert the whole project to ADO

I have a convertion table at http://www.databasejournal.com/features/mssql/article.php/1490571
I am working from but I am still stuck after   'setting the recordset
Can anyone advise me? I have tried
**************************************************************************************
Dim gr As GridEX
''Dim Rs As Recordset
Dim Rs As New ADODB.Recordset
    Me.grDropDown.Visible = False 'to be sure the control is hidden
    Set gr = Me.grDropDown.Object
    'setting Bound and Replace columns
    gr.ReplaceColumnIndex = "Status"
    gr.BoundColumnIndex = "StatusID"
   

  Dim strSQL As String
    strSQL = "StatusQry"

    Rs.CursorLocation = adUseClient
    Rs.Open strSQL, CurrentProject.Connection, adOpenStatic, adLockReadOnly
  '' Rs.Open ("StatusQry")
  ''  Set Rs = CurrentDB.openRecordset("StatusQry")
    'setting the recordset
    gr.HoldFields
Set gr.Recordset = Rs
   
    Set gr = Me.GridEX1.Object
    gr.Columns("Status").EditType = jgexEditCombo
    Set gr.Columns("Status").DropDownControl = Me.grDropDown.Object 'setting the dropdown control for the column
   
    Set gr = Me.GRIDEX2.Object
    gr.Columns("Status").EditType = jgexEditCombo
    Set gr.Columns("Status").DropDownControl = Me.grDropDown.Object
ASKER CERTIFIED SOLUTION
flavo

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros