Query Help Please

Crocdundee

Board Regular
Joined
May 10, 2010
Messages
174
Office Version
  1. 2013
Platform
  1. Windows
I am trying to build a QBF and I need help here, on the where line in this query
I am filtering 3 tables...UTAb,W2B,and Worksheet

The problem is on the (W2B.Odds)=[Forms]![Form1]![txtselectodds]) line in the 2nd example
which represents the value in (W2B.Odds) and it works if I use the value of 3.2, but I want to use <3.2
which u can see in the 2nd example.....but sadly this does not work....I am guessing I need to make a variable for the "<"
Hope this is enought information
----------------------

SELECT UTab.Rdate, Worksheet.RcTime, UTab.Track, UTab.RNO, UTab.TAB, UTab.HORSE, W2B.Form, UTab.RATING, W2B.Odds, Worksheet.DIV
FROM (UTab INNER JOIN Worksheet ON UTab.Trckid = Worksheet.Trckid) INNER JOIN W2B ON UTab.Trckid = W2B.Trckid
WHERE (((UTab.Rdate)=[Forms]![Form1]![cboSelectDate]) AND ((W2B.Odds)=[Forms]![Form1]![txtselectodds])) OR (((W2B.Odds) Is Null));....(This example works)

-------------------------

SELECT UTab.Rdate, Worksheet.RcTime, UTab.Track, UTab.RNO, UTab.TAB, UTab.HORSE, W2B.Form, UTab.RATING, W2B.Odds, Worksheet.DIV
FROM (UTab INNER JOIN Worksheet ON UTab.Trckid = Worksheet.Trckid) INNER JOIN W2B ON UTab.Trckid = W2B.Trckid
WHERE (((UTab.Rdate)=[Forms]![Form1]![cboSelectDate]) AND ((W2B.Odds)<3.2));
Any help here will be appreciated
Graham
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
W2B.Odds<3.2
is valid syntax and should work, assuming that the Odds field is formatted as a numeric field.

What happens when you try to use this?
Are you getting errors or unexpected results?
 
Upvote 0
Thanks Joe for your help, much appreciated and I got it working .
Apologise for the delayed answer

Graham
 
Upvote 0

Forum statistics

Threads
1,224,545
Messages
6,179,432
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top