Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
favor08
Starting Member
1 Post |
Posted - 2006-11-16 : 18:06:45
|
I would like to filter a subform by using a sql statement in vba.I want to be able to say. afterupdate on a combo box. select "*" where[excd]<>"ne" and [billstatus] = bu then select the items where [excd]="Ne" and [billstatus]<>= bu.What I want is all the "BU bill status that [excd] does not equal "ne" and all the items were {excd] = ne but the bill status does not equal bu.Hope H. |
|
KenW
Constraint Violating Yak Guru
391 Posts |
Posted - 2006-11-17 : 13:39:17
|
[code]select * from yourtable y where (y.excd <> 'ne' and y.billstatus = 'bu') or (y.excd = 'ne' and y.billstatus <> 'bu)[/code]EDIT: Put in aliases I missed.Ken |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-11-18 : 04:45:33
|
>>EDIT: Put in aliases I missed.You dont need alias until you join it with other tableMadhivananFailing to plan is Planning to fail |
|
|
|
|
|