473,385 Members | 1,645 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,385 software developers and data experts.

Self Destructing Query Expressions?

All right I am new at access but why would my calculated fields in my query self destruct all of a sudden? I tested these expressions, saved the query and closed it. I reopened them and tested it. Then left access for a minute, but left it open, and when I return to it I get the following:

Compile error . in query expression '{quotes expression}

This is the expression that is quoted when I try to run the query:

Format(Mid(Project.ProjectNo,(InStr(1,Project.Proj ectNo,"-")+1),4),"#") AS RouteN

This is the expression that is quoted when I try to open the query in design view:

Format(parcelRangeQuery.Expr1,"0") AS Expr1005

It then opens it in SQL view and here is the whole text of the query:

SELECT Owners.MailCity, Owners.OwnName, Parcels.ParcelNo, SubParcels.SubParcelNo, Owners.OwnCounty, Owners.MailState, Owners.OwnerType, SubParcels.IsRefParcel, Project.ProjectNo, Format(Mid(Project.ProjectNo,(InStr(1,Project.Proj ectNo,"-")+1),4),"#") AS RouteNo, Parcels.SideOfRoad, Parcels.LowSta, Parcels.HighSta, SubParcels.Description, SubParcels.IsNA, SubParcels.IsLA, Properties.TaxID, Prop_isIn_Municipality.MunicCounty, Format(parcelRangeQuery.Expr1,"0") AS Expr1005
FROM ((Project INNER JOIN (((Parcels INNER JOIN parcelRangeQuery ON Parcels.ParcelNo = parcelRangeQuery.ParcelNo) INNER JOIN Properties ON Parcels.ParcelNo = Properties.ParcelNo) INNER JOIN SubParcels ON Parcels.ParcelNo = SubParcels.ParcelNo) ON Project.ProjectNo = Parcels.ProjectNo) INNER JOIN Prop_isIn_Municipality ON Properties.TaxID = Prop_isIn_Municipality.PropTaxID) INNER JOIN (Owners INNER JOIN Property_has_Owners ON Owners.OwnName = Property_has_Owners.Owners) ON Properties.TaxID = Property_has_Owners.PropTaxID
WHERE (((Parcels.ParcelNo)=[Enter Parcel No]))
ORDER BY Owners.MailCity DESC , Owners.OwnName DESC , SubParcels.SubParcelNo, SubParcels.IsRefParcel DESC , Properties.TaxID;
Jun 27 '07 #1
3 1912
I am even more confused now, it is working again.

Can anyone tell me what is going on?
Jun 27 '07 #2
JKing
1,206 Expert 1GB
The only thing I can see wrong is a misplaced space in the line within the InStr between Proj and ectNo:

Format(Mid(Project.ProjectNo,(InStr(1,Project.Proj ectNo,"-")+1),4),"#") AS RouteN

Now I'm assuming you closed it without saving and upon reopening it's now working again. Misplaced spaces can cause errors... so perhaps you hit spacebar accidentally?
Jun 27 '07 #3
The only thing I can see wrong is a misplaced space in the line within the InStr between Proj and ectNo:

Format(Mid(Project.ProjectNo,(InStr(1,Project.Proj ectNo,"-")+1),4),"#") AS RouteN

Now I'm assuming you closed it without saving and upon reopening it's now working again. Misplaced spaces can cause errors... so perhaps you hit spacebar accidentally?

Actually I saved when I closed and had noticed the space after I posted (it doesn't show in the actual query). I guess if it happens again I'll have more information. Thank you for your reply.
Jun 28 '07 #4

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

Similar topics

2
by: aj70000 | last post by:
This is my query select ano,max(date),a_subject from MY_TAB where table_name='xyz' and ano=877 group by a_subject,ano order by a_subject ANO max(Date) A_Subject 877 2005-01-20...
14
by: signaturefactory | last post by:
I am trying the following query in and oleDbCommand: SELECT PartLocations.LocationName, Sum(PartsJournal.Quantity) AS SumOfQuantity, PartsJournal.PartsLotNumber FROM PartLocations INNER JOIN...
10
by: Rada Chirkova | last post by:
Hi, at NC State University, my students and I are working on a project called "self-organizing databases," please see description below. I would like to use an open-source database system for...
4
by: Shahzad | last post by:
dear respected gurus, I would like to knew how to apply append,insert query for a self table where no primary keys issues. i do have problem say there are 5 rows of single record, this is data...
13
by: Lee | last post by:
Hello All, First of all I would like to say thank you for all of the help I have received here. I have been teaching myself Access for about 4 years now and I've always been able to find a...
16
by: paullanier | last post by:
It seems that lots of people don't like having to prefix self. in front of instance variables when writing methods in Python. Of course, whenever someone suggests doing away with 'self' many...
3
by: Jarmo Muukka | last post by:
Hi all! I have a small problem I cannot find a good solution. The problem is destructing global (static) variables in correct order. I try to mimic it in here. // file1.cpp contains...
11
by: Stuart Owen | last post by:
Hi, I'm a relative beginner to Access, and have just found out how to construct a 'query by form' using the SQL, Select/From/Where approach. With the addition of a few wildcards, I've got a form with...
8
by: kvt | last post by:
Hi, One of my friend puzzled me to write a program which destructs itself. i.e, by the time it stops execution, its executable file should be deleted. I tried a lot like a) using " system()...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.