Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21100

Searching database help needed..

$
0
0
Im trying to search my MS Access database but its not the usual searching of record.
Im trying to search a record which is lesser (<) than the value that im using to search for it,

as an example.
i have
10/12/13
10/12/13
10/22/13
10/10/13
10/11/13
10/27/13
as the contents of my 'Date' column..
I want the listview to only display the dates that are lower than '10/12/13' for instance..

here's my usual code for searching my database.
Code:

Sub search()
Set rs = New ADODB.Recordset
rs.Open "select * from tblDispatched where ReturnDate like'" & (Text4.Text) & "&';", cn, adOpenKeyset, adLockOptimistic

'Text4.text' has the current date or '10/12/13'
how can i display the records that are earlier or less (<) than '10/12/13'

Thank you for taking your time to read this thread

Viewing all articles
Browse latest Browse all 21100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>