Operator Between

BeataG

Registered User.
Local time
Today, 09:20
Joined
Oct 24, 2008
Messages
21
Hi,
I have a question...
Is it possible to use the following command with the "between" operator:

DoCmd.RunSQL "UPDATE points SET my_avg = between 4,05 and 4,28"

I've tried put this in the form as a subclick but it doesn't work. Can I use operators in such commands? If not, what is the best way to update table so as to only records that contian values mentioned above were showed in the final result.
I'm going to create 4 such kind of commands, because I have got four ranges of values, each range is going to be placed under the separate button.

Thanks for any suggestion.
 
I don't think so. What exactly are you trying to do? Based on the SQL, you're trying to set the value of that field to some unspecified value between 4.05 and 4.28. Based on your description, you want to update records that contain values in that range. In that case you would do:

UPDATE points
SET my_avg = ???
WHERE FieldName between 4,05 and 4,28
 
Ok,

Let me describe you in details what I wanted to do. I have a table with over 2000 rows. In each rows in the my_avg field is placed a number that represents average of sth. These all values are going to be put in the adequate range ( 4 ranGes). I'd like to create a form where 4 buttons are placed. Each button "contains" one "range". I don't want to create additional 4 queries that may be put then under these buttons. Iwonder if it possible to use only this one table to separate the values and put them into proper range and after clicking the adequate button the list of selected values id displayed.
I hope i am understandable.
 

Users who are viewing this thread

Back
Top Bottom