Crocdundee
Board Regular
- Joined
- May 10, 2010
- Messages
- 174
- Office Version
- 2013
- Platform
- 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
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