473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

access generates error when i open a query

9815402440
180 100+
hi
i am using acess 2003 as back end of my application.
database was fine a few days back. i have a table named Ac_LedgerMaster.
i have several tables that are related to this table. now relations to a field in this table have reached the maximum limit i.e. i can no more relate this paricular field to any other table. but this database is still fine. after that i added 7 union queries. there are 3 other quereis that are drawing data from the 7 union queries.
now whenever i add a new table or query in the database one of the 3 queries gets currupted. when i double clik on a paricular query (out of aforementioned 3 quereis) then following error message is displayed
"Microsoft access database has encountred a problam and needs to be closed."
on clicking 'Dont Send' button database closes.

any minor change in that query solve the problam. i open it in design view. and replace double quotes with single quotes e.g. numAmount:val(numAmount & "") is replaced with numAmount:val(numAmount & '')

whenever i add a new query or alter an existing query any one of the 3 quereis gets corrupted. now i replace the single quotes with double quotes. it again solve the problam. but now a query is currupted again. i could not resolve the plroblam by all of my efforts.


please help
regards
manpreet singh dhillon hoshiarpur
Jan 1 '09 #1
5 1636
puppydogbuddy
1,923 Expert 1GB
assuming that numAmount is numeric, change this:
numAmount:val(numAmount & '')

To this:
numAmount:nz(numAmount,0)
Jan 1 '09 #2
nico5038
3,080 Expert 2GB
Sounds like your database is corrupted, check:
Corrupt Microsoft Access MDBs FAQ

Personally I would start with importing all objects into a new database with File/Get external data/Import.

Nic;o)
Jan 1 '09 #3
9815402440
180 100+
hi nico5038
i tried importing all objects in new database. when i run a query (only out of 3 queries mentioned above) at first it gives message 'Query is too complex'
when i double click again then same error (Send/Dont Send) reporting box occurs.
i unable to know why only one of these three queries gets corrupted.
please help
Jan 5 '09 #4
nico5038
3,080 Expert 2GB
Can you create a small sample .mdb and add that zipped to your comment (click the Advanced button)
so I can have a look ?

Nic;o)
Jan 5 '09 #5
NeoPa
32,556 Expert Mod 16PB
I had a problem similar to that once. I found the query was un-editable.

I got around it by taking the SQL out of the query (CurrentDB.QueryDefs("Query Name").SQL) and checking it manually. I fixed any problems I found then built up a string with the new version. This was then injected back into the query :
Expand|Select|Wrap|Line Numbers
  1. CurrentDB.QueryDefs("Query Name").SQL = strSQL
Hope this is some use.
Jan 6 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Frnak McKenney | last post by:
Back when computer dinosaurs roamed the earth and the precursors to today's Internet were tiny flocks of TDMs living symbiotically with the silicon giants, tracking access to data processing...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
7
by: Larry B via DotNetMonster.com | last post by:
Hello, I seem to be having a problem with inserting data, from a web form, into an access database. I have tried to do the same thing in a regular windows app, there it works fine, but when I...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
1
by: dixcyn04 | last post by:
Ok, now I've run into another little hiccup in my application. The ability to update records already in existance. What is bugging me about this, is the code I will submit was what I found on forums...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.