Hidden query problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have been given a database that is having difficulties with life in
general. There is an error that comes up, not all the time that tells the
user they dont have permissions etc. On viewing hidden objects I see that
there is a hidden query called ~sq_fCampSelectFrm now the CampSelectFrm is an
existing form. the problem is that I keep getting errors coming up and most
of them point to this hidden query, one of them is when I try to add a
digital signature to the VBA when I go to save the code I get the following
'Could not read definitions, no read definitions for table or query
'~sq_fCampSelectFrm' I have been using VBA for years and never have come
accross this error. Also I seem not to have permissions to be able to delete
the query.

Well hope someone out there can help me.

Thanks for your time,

Mike J, Soames
 
That query is the record source for the form. You could create a stored query
and use it instead.

Sounds to me like you might be having a corruption problem. Tony Toews has
an excellent web page on database corruption.
http://www.granite.ab.ca/access/corruptmdbs.htm

Allen Brown also has excellent info on corruption.
http://allenbrowne.com/ser-47.html

I have a white paper in a Word document named Fix Corrupt Access Database
towards the bottom this page:
http://www.rogersaccesslibrary.com/OtherLibraries.asp
 
Hi Mike,

First thing I would try is to import all the objects (tables, forms,
queries, reports and modules) EXCEPT this flaky query (~sq_fCampSelectFrm)
into a new database, recompile, test all the forms and reports etc. Lots of
times this fixes things much quicker than beating your head into the wall,
especially with a "hand-me-down" not of your design.
 
I neglected to mention that queries that begin with ~sq_ are almost always
SQL statements used as record sources for forms and reports. Back in the day,
Access would only optimize queries found under the Queries object tab in the
database window. SQL statements used in forms and reports often ran slower as
they had to be optimized each time run. In later versions of Access,
Microsoft started optimizing these SQL statements and gave them the bizarre
name like what you found. AFAIK you should only mess with these queries while
in the appropriate form or report design.
 
Thank you both for your comment. I have infact produced a new DB without
the offending item.
Now I have the problem with Datacleansing and boy is there some, they had
over 18000 records and I think 30% of them are repeats.
See you in the next life lol.

Mike J. Soames
 
Back
Top