Query ignoring equal sign

riggsd

Registered User.
Local time
Today, 11:39
Joined
Dec 2, 2003
Messages
28
First of all, thanks for your assistance on my previous postings. It is greatly appreciated.

Second, I have some queries that I copied from my current database to my new database. I changed the names of the fields, tables, and forms, but not the logic, etc. in the queries.

The problem is that the queries seem to be ignoring the second equal sign in the code.

This code:

WHERE (((tbl_PPLInstances.FirstFlight)<=[Forms]![frm_SelectbyFlightRange]![cmbSelectFlight]) AND ((tbl_PPLInstances.LastFlight)>=[Forms]![frm_SelectbyFlightRange]![cmbSelectFlight]))

Is evaluated as:

WHERE (((tbl_PPLInstances.FirstFlight)<=[Forms]![frm_SelectbyFlightRange]![cmbSelectFlight]) AND ((tbl_PPLInstances.LastFlight)>[Forms]![frm_SelectbyFlightRange]![cmbSelectFlight]))

The first equal sign is evaluated correctly, but it's throwing out the second one.

This code:

WHERE (((tbl_PPLInstances.FirstFlight) Between [Forms]![frm_SelectbyFlightRange]![cmbFirstFlight] And [Forms]![frm_SelectbyFlightRange]![cmbLastFlight]) AND ((tbl_PPLInstances.LastFlight)>=[Forms]![frm_SelectbyFlightRange]![cmbMidFlight]))

Is evaluated as:

WHERE (((tbl_PPLInstances.FirstFlight) Between [Forms]![frm_SelectbyFlightRange]![cmbFirstFlight] And [Forms]![frm_SelectbyFlightRange]![cmbLastFlight]) AND ((tbl_PPLInstances.LastFlight)>[Forms]![frm_SelectbyFlightRange]![cmbMidFlight]))

The Between is evaluated correctly, the equal sign in the second half of the equation is ignored.

Any idea why this is happening and how I can fix it?

Not sure if this makes a difference, but the current database was built in Access97 and converted to Access2K. The new database is being built from scratch in Access2K.

(oh, and the forum code is putting the spaces in between the operators, there aren't any.)
 
Is it possible that it is seeing the equal sign as a calculated control expression?

From the Access help file:

Note Calculated control expressions are always preceded by an equal sign (=).
 
You seem to have spaces between the = and >/< signs. Remove them. > is an operator, = is an operator, and >= (no space) is an operator.
 
Pat Hartman said:
You seem to have spaces between the = and >/< signs. Remove them. > is an operator, = is an operator, and >= (no space) is an operator.

I don't have spaces in the operators, the forum software added those when I posted the message.
 

Users who are viewing this thread

Back
Top Bottom