tags:

views:

25

answers:

1

I'm trying to rebuild an Access adp application in Access 2007. I started with a blank database, linked the SQL Server tables I need with ODBC, and then copied over all of the forms from the original application. I then updated the data sources for the forms to go to the correct tables.

When I open one of the forms, I get the error "Syntax error in WITH OWNERACCESS OPTION declaration". This error is occurring before the Open event code is being run.

Does anyone have any ideas about how to track down where this error is coming from? Or maybe an idea of another way to do this altogether?

Thanks!

A: 

WITH OWNERACCESS OPTION makes no sense in an ADP, as it's a command for Jet SQL for use with Jet user-level security. With an ADP, the security should all be set on the server. So, you should remove all the WITH OWNERACCESS OPTION statements from your form RecordSources.

Frankly, I'm not sure they have an effect in anything other than a saved QueryDef, so likely they were an error in the original application.

Also, I would never recommend copying anything from an MDB into an ADP. First off, I don't believe migrating to an ADP is ever advisable (though I certainly use ADPs as an administrative tool with my MDB/ODBC apps that use SQL Server), but secondly, there are so many differences between the two platforms that I just can't see them working.

If I chose to migrate an MDB to ADP (and I can't imagine that I ever would, given that MS has been deprecating ADPs for about half a decade now), I would start from scratch and rebuild it from the ground up.

David-W-Fenton
Thanks for the answer, David! I'm sorry I wasn't clearer in my question - actually I'm trying to migrate from an adp to an accdb in Access 2007. Maybe you can think of a way to get rid of the error in that scenario? It sounds like you know a lot more about Access than I do!
Beth Broman Appel
Without the SQL that's causing the problem, or more information about the context, it's quite difficult to say. Certainly ACCDB does not support Jet ULS, so there is no purpose in using WITH OWNERACCESS OPTION there, either.
David-W-Fenton
I have no idea where the "WITH OWNERACCESS OPTION" is in the application, since it's not in the code at all. I guess I should look more closely at the properties of the form that is causing the problem.
Beth Broman Appel
It's really my ignorance of Access that was causing the problem. There was a row source that was causing the problem. Once I fixed that, the error went away. Now I have an almost-working accdb database! Your comment made me look in the right direction - thanks!
Beth Broman Appel