CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: OpenRecordSet

  1. #1
    Join Date
    Apr 2001
    Location
    Here right now, but could be somewhere else later
    Posts
    1

    OpenRecordSet

    This is my first posting as a beginner n i would really appreciate any help possible:

    The following code results in a "too few parameters. expected 1". it bottoms out on the set recordset line. I believe this is because the recordset i am trying to open is dependant on a control in the form which is open at run time.

    i really need help and any would be really appreciated

    set Recordset = CurrentDb.OpenRecordset("qryfindherocard")

    If Recordset.RecordCount < 1 then

    DoCmd.OpenQuery "APqryAddNewHeroFromNorpass"

    else:
    DoCmd.OpenQuery "UDqryAddNewHeroFromNorpass"

    End If

    me.RecordSource = "qryFreeNorpassRecords"
    me.Requery





  2. #2
    Join Date
    Apr 1999
    Location
    VA BEACH
    Posts
    467

    Re: OpenRecordSet

    set recordsource should be equal to the recordset not the name of the query I would imagine.

    set me.RecordSource = Recordset



    you might be having errors because your objects are named with type names...try using rs for recordset as it maybe conflicting with a type.



    Jim Hewitt
    Software Developer
    Liberty Tax Service
    www.LibertyTax.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured