Link to home
Start Free TrialLog in
Avatar of rsoble
rsoble

asked on

UniqueTable property applies to stored procedures?

I've succcessfully set the UniqueTable property on forms that have their recordsource based on a view.  Now I have a form with a recordsource set to a stored procedure (using the InputParameters to pass two parameters) but I get an error when I try to set the UniqueTable property.  Error reads: "The text you entered is not an item in a list".  This is because when I click on the dropdown arrow, there are no tables displayed as would be with a view recordsource.  

I have checked that all the tables (3) in my stored procedure query have PKs and that the PK of the table that I want to be the UniqueTable is included in the query result.   Is it just not possible to set a UniqueTable for a stored procedure recordsource?  If not, any recommendations on a workaround?

I guess I can set it to a view and then use ServerFilter to filter by the two parameters.  Is that equally as efficient as the stored procedure?  

Thank you.


Avatar of rsoble
rsoble

ASKER

Here's an excerpt from the Access help about UniqueTable:
"Specifies the table to be updateable when: A form or data access page is bound to a multiple table view or stored procedure within a Microsoft Access project (.adp)."

So it theoretically WILL work with a stored procedure.  Any ideas why it isn't working with mine?  I'm upping the points, let me know what further info you might need.  Thanks!
Avatar of rsoble

ASKER

Hi - can someone at least try this themselves and see if they get the same problem?  Make a form, recordsource set to a stored procedure, put a parameter or two in the inputparameters, see if you can get a table to appear in the uniquetable dropdown list.  Simple, don't even need to open VB.  Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Krys_Wilson
Krys_Wilson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rsoble

ASKER

Hey Chris - it just so happens that today I did that very same thing you suggested, but by accident.  And it worked for me too! :)  I was able to set my two input parameters to values retrieved from the form, but only after I had the UniqueTable set.  Thanks very much for your help, hope you had a fun vacation -- Rebecca.
No problem and glad you figured it out!

If you have any more questions just let me know!

Chris
Avatar of rsoble

ASKER

oh this is so frustrating - I had the UniqueTable working perfectly and then I did something and now it's not working again.    In order to get it set I had to remove the parameters from my stored procedure, save the form with parameter-less recordsource, and then it let me choose a UniqueTable.  But even then, when the UniqueTable is set, the fields in the form that come from the UniqueTable are not updatable.  

This has happened before.  I solved it then by  (1) making sure all my tables had PKs and (2) making sure that I included the PK field from my unique table as a field in the recordsource.

Now I have all these things set and the fields in my form are still not updatable.  The maddening thing is that it was working when I last checked yesterday and for the life of me I can't see what's different!  Admittedly stupid me tried to do one more tweak to my stored procedure but I've since taken that back out (I can live without it, it was just another WHERE to eliminate a few unnecessary records) and I can't get it working again.  What a waste of time.  So Chris if you're still out there, have any more great ideas?? :)  

Hm, I should start another question so you (or some other brilliant person) can get more points.  Tell me what's the best way to do that.  I'm going to go check the microsoft website now.