Dan, I haven't struck the specific problem, so if anyone else has, hopefully
they will contribute.
Presumably you have either digially signed the database, or added its folder
to your trusted locations under:
Office Button | Access Options | Trust Center | Trust Center Settings
You must not use the Office 11 library. The Office 12 library should provide
the functionality you need. It is possible that your code uses some
deprecated or removed features such as these:
http://allenbrowne.com/Access2007.html#Compatibility
However, if that were the case, I would not expect the code to compile
(unless you are using something like late binding that prevents the compiler
recognising it.)
So the short answer is, Yes: the Office 12 library should give what you
need. I've converted several database to ACCDB files, and opened many MDBs
under Office 12, and they all worked fine. But mind you, I used only 3
libraries (Access, VBA, and DAO), and I tend to write pretty standard code
so as to avoid future upgrade issues.
The parameter asking for the primary key value is a worry. I could
understand that if the parameter value were not a literal but somehing like:
[Forms].[Form1].[Text0]
because you have a chicken'n'egg issue here.
But it ought not to ask for the parameter if:
- the value is a literal, and
- the field name is spelled correctly, and
- the field name is included in the query, and
- the literal is correctly delimited (without the quotes for a Number type
field), and
- the name is not a reserved word, and
- you have turned off Name AutoCorrect (to prevent Access getting confused
about the name.)
You say the problem occurs when you set the Recordset of a form. I rarely do
this, as I have found it less stable than setting the RecordSource. So I
often open a form without any records e.g.:
SELECT * FROM Table1 WHERE (False);
and then assign the RecordSource based on the user's needs, e.g.:
http://allenbrowne.com/ser-62.html
Not sure that answers you q.; just thinking out loud with you.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Dan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am a pretty seasoned MS Access Developer, and (at the moment) I
> will not go into the details of my code, etc. I'll do that later if
> nobody seems familiar with my issue. i have an MS Access 2003 DB with
> lots of code, forms, queries, etc. and it runs just fine under XP or
> Vista.
>
> However, on my Vista machine, I installed MS Access 2007. Now, my
> 2003 DB will not open any forms. (Will not run under MS Access 2003.
> Not trying to convert up here, just want both versions on the PC, and
> (for now) want the code to run as it should under 2003!)
>
> The tables and queries seem OK. The forms are based on a default
> query that includes a value (ie first part# in database as in
> "11111111" ). This is because I change the forms recordset via code
> often, so the default is a simpe query for my use (as the developer)
> that lets me open a form in normal view, and see one record.
>
> When I try to open ANY form, (and there are many, all based on
> different tables with different keys, etc.) I get a message asking for
> a parameter value for the Primary key. Remember, I just told you that
> the default query for each form has no parameters. The value is
> placed in within quotes in the Qrydef window.
>
> If I click a few times, I get an error message that basically
> statesthat I may have a missing refference. However, No ref's are
> missing, and the code will still compile. What I DO SEE is a ref to
> MS Access 12 Object Library, and the MS Access 11 Object Library is
> not in the list to chose from.
>
> So, the short question for now, is this: SHOULD the version 12 Object
> library work (backward compatible) with MS Access 2003, or not? And,
> if NOT, why is the version 11 Object Library missing after my install?
>
> I have searched on the web, and cannot find anyone complaining of a
> similar problem.
> I have not opoened the 2003 DB with 2007, all I did was install 2007
> (leaving Access 2003 on the machine).
>
> If you can help, fine. if not, just ask and I can send more details.
>
> THANKS!