473,382 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to search date

I'm using vb 6.0 and ms access 2003 on my project. . .im trying to filter my database using its field Release_Date, im trying to search those records with a perticular month and year. here is my initial code:

me.adodc1.recordsource = "Select * from table where Release_Date like '%" & me.DTPicker.month & "%' and Release_Date like '%" & me.DTPicker.year & "%' "

i make sure to it that the format of my field Release_Date and my DTPicker is both long date, i figured out however that although my DTPicker is in longdate, the value it returns is in number form. it works sometimes, but in the case of january and february, it returns the value 1 and 2, the problem is that the year 2010 contains the two numbers, so it display everything with the year 2010. Then i tried to use combo boxes, one that contains the months, and the other contains the year, and change my code to:

me.adodc1.recordsource = "Select * from table where Release_Date like '%" & me.Combo1.text & "%' and Release_Date like '%" & me.Combo2.text & "%' "

the problem with my new code is, i think, my data base only accepts numbers too, so it does not display anything using my new code. . .

can you guys help me with this one, how could i display the records with my chosen month and year. . .thanks a lot, i hope to hear something from you guys soon. . .thanks
Mar 12 '10 #1
2 3391
Hi
Find my attached help.

thankx
Attached Files
File Type: zip Retrieve Data based on Input.zip (12.8 KB, 258 views)
Mar 12 '10 #2
hey, thanks for the reply, though i haven't tried it yet. i really appreciate it. . .im surely making friends in this site now. . .hehe, thanks again, and godbless. . .
Mar 13 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Greg | last post by:
I have a page that searches a database by a repairman's name and by a date range. It pulls info by the repairman's name but pulls all info in the database regardless of the date. Below is the code...
1
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and...
1
by: Eric | last post by:
Hi: I have two files. I search pattern ":" from emails text file and save email contents into a database. Another search pattern " field is blank. Please try again.", vbExclamation + vbOKOnly...
3
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and...
0
by: Laszlo Nagy | last post by:
Hi, I'm using imaplib to access an IMAP4 server. I'm reading the IMAP4 specification, and I found something odd. The search command can be used in conjuction with date values. For example, I...
2
by: caine | last post by:
I'm doing a search application for my project. My code can prompt alert popup window when the user doesn't key in any keywords. However, if the user keys in any keywords, it juz return "Please...
9
by: Rick | last post by:
I have a large list of objects where each object has a unique (non-overlapping) date range. The list is sorted chronologically. What is the most efficient way to search this list for a single...
14
by: Simon Gare | last post by:
Hi, have a search.asp page with results.asp page drawing data from an SQL db, problem is the user has to type the whole field value into the search box to retrieve the value on results.asp, what...
1
by: nik707 | last post by:
Hello all, I would like to develop a date search from Form in Access. Here is the sample of previous search coding I have developed used the help of experts on this forum. 'Approach to CSR...
0
by: KevLe | last post by:
I'm building a log search function in c# for a certain management app and would like some help on the design how to solve this, here is my solution (on paper) so far: The log files are saved to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.