-
Jan 30th, 2014, 04:25 PM
#1
Thread Starter
Enjoy the moment
[RESOLVED] where clause error
what is missing here?
Code:
Set rs = CN.Execute("SELECT * from Expenses WHERE ExpRemarks ='ABC')
-
Jan 30th, 2014, 04:29 PM
#2
Thread Starter
Enjoy the moment
Re: where clause error
Code:
Set rs = CN.Execute("SELECT * from Expenses WHERE ExpRemarks ='ABC'")
got it
-
Jan 30th, 2014, 04:30 PM
#3
Re: where clause error
The closing "
Code:
Set rs = CN.Execute("SELECT * from Expenses WHERE ExpRemarks ='ABC'")
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
Jan 30th, 2014, 04:50 PM
#4
Frenzied Member
Re: where clause error
always use the following way to avoid the issue .
Code:
dim sql as string
sql="SELECT * from Expenses WHERE ExpRemarks ='ABC'"
set rs=cn.execute(sql)
-
Jan 30th, 2014, 04:51 PM
#5
Thread Starter
Enjoy the moment
Re: [RESOLVED] where clause error
hey jggtz tnx for the reply but the where clause dosnt work
Code:
ElseIf BChecks.Value = True Then
Set rs = CN.Execute("SELECT * from Expenses WHERE ExpRemarks ='abc'")
LsVw.ListItems.clear
While Not rs.EOF
Set itm = LsVw.ListItems.Add(, , rs!ExpDate, , "dolar")
itm.Tag = rs!ExpID
itm.SubItems(1) = rs!ExpItem
itm.SubItems(2) = FormatCurrency(rs!ExpCost)
itm.SubItems(3) = rs!ExpQuantity
itm.SubItems(4) = rs!ExpBill
itm.SubItems(5) = rs!ExpMethod
itm.SubItems(6) = rs!ExpCard
itm.SubItems(7) = rs!ExpPayments
itm.SubItems(8) = rs!ExpFinalDate
itm.SubItems(9) = rs!ExpBank
itm.SubItems(10) = FormatCurrency(rs!ExpTotal)
itm.SubItems(11) = rs!ExpRemarks
rs.MoveNext
TxtFind.SetFocus
Wend
End If
it dosnt filter
-
Jan 30th, 2014, 05:00 PM
#6
Frenzied Member
Re: [RESOLVED] where clause error
what it does not filter . the syntax of your where clause is ok .did you get any error message ?.
Code:
dim sql as string
sql="SELECT * from Expenses WHERE ExpRemarks ='ABC'"
debug.print sql
set rs=cn.execute(sql)
-
Jan 30th, 2014, 05:04 PM
#7
Thread Starter
Enjoy the moment
Re: [RESOLVED] where clause error
no error
i want to filter the table by name abc
-
Jan 30th, 2014, 05:12 PM
#8
Frenzied Member
Re: [RESOLVED] where clause error
i want to filter the table by name abc
if expremars='Name' then you want to show those records in a listview . is it that way ?
-
Jan 30th, 2014, 05:13 PM
#9
Thread Starter
Enjoy the moment
Re: [RESOLVED] where clause error
yes if there is abc then i see all the records that match abc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|