|
-
Oct 21st, 2011, 01:35 PM
#1
Thread Starter
Junior Member
[RESOLVED] Sql statement
Here`s my problem:
aamort = Application.InputBox("Qual o ano q pretende imprimir?", Type:=1)
strSQL1 = "SELECT ID,descricao,anoaq,valaq FROM tbltransfer where [anoaq]<=" & aamort
strSQL1 = strSQL1 & " order by ID asc"
rs1.Open "tbltransfer", cn, adOpenDynamic, adLockOptimistic, adCmdTable
I want all records with anoaq<=aamort, where aamort is a variable asked at the user.
But this statement returns all records!!
why its returning the records with anoaq>aamort
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
|