473,395 Members | 1,656 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,395 software developers and data experts.

Search Access dataBase by Date

Assalam alaycom"Hello"
Hello everybody, I have a problem in searching the database using certain date.
The probem is how I can convert the date from textbox to be used by vb code to match dates in the database.
I will appreciate if anyone can help. Thanks.
Oct 11 '07 #1
3 4269
Killer42
8,435 Expert 8TB
Just take the value from the text box and put hashes (#) around it in the SQL string. For example...
Expand|Select|Wrap|Line Numbers
  1. Dim strSearch As String
  2. strSearch = "SELECT * FROM [TableName] WHERE [FieldName] = #" & Textbox.Text & "#"
Oct 11 '07 #2
thanks Killer42 for ur help. i'll try it.
Oct 15 '07 #3
Select * From [TABLENAME] Where [DateFieldName] = #" & format(textbox.text, "MM/dd/yyyy") & "#"
Oct 15 '07 #4

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...
5
by: Abby Lee | last post by:
My code does what I want (works unless there is a lot of volume...works for this month cause not a lot of items marked paid yet...) but the page times out for last month because there is just so...
83
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd...
4
by: Gobi | last post by:
Hello, I have a Database with lists of Clients in each. Every year a new tables is created with the naming convention "CloseYear" ie close1999, close2000 There are tables from this year back to...
1
by: DD | last post by:
I enter a date dd/mm/yyyy in txtCriteria to search for a BuyDate this works fine in databases in the past, however i now have to enter the search date as mm/dd/yyyy BuyDate reads as dd/mm/yyyy 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...
5
by: keithsimpson3973 | last post by:
Hi, I have an Access 2003 database I am running with vb 6. I have one report that I want to filter on the Start_Date and Stop_Date in a scheduling database. I would like to enter a stop and stop...
1
by: jl2886 | last post by:
First question: I have an assigned ID that is based on the month and year and then the numbered case. For example, If a new policy came in in March of 07 and he was the 67th person who was entered...
1
by: James890 | last post by:
I want to enable a user to enter a start and end date to define the period they want to search for records of members who joined on certain dates. Funny thing is...I've got it to work half of the...
1
by: sunnyluthra1 | last post by:
Hi Everyone, I am working on a piece of code, that displays the properties(Name, Datatype, size & Description) of the table in the database. Now I want to further Enhance the code. I Have created...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.