Click to See Complete Forum and Search --> : OpenRecordSet


andrewb
May 3rd, 2001, 11:45 AM
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

James Longstreet
May 3rd, 2001, 11:55 AM
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