Mark
asked on
Use stored procedure as record source on subform
I must be an idiot today. I'm trying to create a subform in access. The wizard asks me, "What data would you like to use for your subform or subreport?" It gives me the options of 'Existing Table and Views' or 'Existing Forms'. Stored procedures is not an option. If I select 'Table and View' stored procedures are not listed. If I cancel the wizard and type the name of my stored procedure into the subform properties Record Source it says, "The form name 'myProcedure' is misspelled or refers to a form that doesn't exist".
I've only ever created one subform in Access about six months ago and it specifies a stored procedure as the record source. How did I get the s.p. in that subform? I have amnesia.
I've only ever created one subform in Access about six months ago and it specifies a stored procedure as the record source. How did I get the s.p. in that subform? I have amnesia.
ASKER
I use stored procedures with forms all the time. This is a subform. This is for ADP. I did it on my other subform, so I know it can be done. I just don't know how I did it.
so what if u created a view that behaved the same as the stored procedure with the exception of any parameters that it may take,
and then linked in that view?
on your form code, u can apply the relevant filters
and then linked in that view?
on your form code, u can apply the relevant filters
ASKER
A view won't work very well. There are 10s of thousands of records to aggregate and I just need a tiny selection.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
FYI
Its a known issue in Access 2000 that the stored procedures dont show up in the create new form wizards. If you just create a blank form you can go into the form properties and then select your stored procedures. But hey if your up and running now anyway....
Its a known issue in Access 2000 that the stored procedures dont show up in the create new form wizards. If you just create a blank form you can go into the form properties and then select your stored procedures. But hey if your up and running now anyway....
I dont think u can do this for MDB's unless Im mistaken
have a look at this http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmart00/html/sa00f10.asp
and check out the paragraph "Using stored procedures with forms"