Filtering Rows With SQL Select

  • Thread starter Thread starter latin & geek via DotNetMonster.com
  • Start date Start date
L

latin & geek via DotNetMonster.com

hi.

ive been trying to filter rows from an access table with the sql select
command, this is the line i used:

sql1 = "SELECT cus1,wexp,sno, model, invdate, invno,amt, equip, roll FROM
amc1 WHERE branch like '" & x & "' AND invdate < 'dateto'"

the 'where' bit works, but the invdate filter doesnt. however, there are also
no error messages - the pgm runs ok.
any ideas anyone?

thanks.
 
Hi,

You are always comparing invdate to a string dateto

'dateto'"

You should try something like this

'" & dateto.tostring & "'"

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top