A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

query criteria from combo box on a form



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2006, 04:59 AM posted to microsoft.public.access.forms
Fipp
external usenet poster
 
Posts: 102
Default query criteria from combo box on a form

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."
  #2  
Old November 8th, 2006, 02:09 PM posted to microsoft.public.access.forms
Roger Carlson
external usenet poster
 
Posts: 222
Default query criteria from combo box on a form

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/...UBED1=ACCESS-L


"Fipp" wrote in message
...
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."


  #3  
Old November 8th, 2006, 07:01 PM posted to microsoft.public.access.forms
Fipp
external usenet poster
 
Posts: 102
Default query criteria from combo box on a form

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.

  #4  
Old November 8th, 2006, 08:36 PM posted to microsoft.public.access.forms
Fipp
external usenet poster
 
Posts: 102
Default query criteria from combo box on a form

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?
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:57 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.