query criteria from combo box on a form

F

Fipp

I have a form with several combo boxes on it. I would like the value from
those combo boxes to be the criteria of a field in a query.

I made the form and added a button. The button triggers an event to open the
form. All of that works.

I added the following to the query in the criteria of the down field:
[forms]![selectlog]![logdown]
(the value of the combo box [logdown] = 3)
That worked.

I proceeded to the next field in the query where I have criteria
In the distance field I added the following:
[forms]![selectlog]![logdistance]
(the value of the combo box [logdistance] = <3)
(I thought that having the < sign in the value of [logdistance] might have
been the problem so I changed it to 3

Neither of those worked. Both ways I received the following message:
"This expression is typed incorrectly, or it is too complex to be evaluated."
 
R

Roger Carlson

On my website (www.rogersaccesslibrary.com), are several small Access
database samples that might be useful. They all start with "CreateQueries".

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Fipp said:
I have a form with several combo boxes on it. I would like the value from
those combo boxes to be the criteria of a field in a query.

I made the form and added a button. The button triggers an event to open the
form. All of that works.

I added the following to the query in the criteria of the down field:
[forms]![selectlog]![logdown]
(the value of the combo box [logdown] = 3)
That worked.

I proceeded to the next field in the query where I have criteria
In the distance field I added the following:
[forms]![selectlog]![logdistance]
(the value of the combo box [logdistance] = <3)
(I thought that having the < sign in the value of [logdistance] might have
been the problem so I changed it to 3

Neither of those worked. Both ways I received the following message:
"This expression is typed incorrectly, or it is too complex to be
evaluated."
 
F

Fipp

Roger I appreciate your feedback and I did look at your website and try
several of your applications. I am not great with this stuff and still can't
figure it out. If anyone else can help I would appreciate it. I am trying to
search everywhere.
 
F

Fipp

Now I have gotten distance to work whith 3 being the value of the distance
field. Is there a way to have the value >3 and see it as an expression?
 
Top