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

Date format in search field

DD
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 all other dates read as dd/mm/yyyy.
Why has this started to happen.
I have added a new txtCriteria and this did not fix it, i have checked
all daste formats they are correct.

I have checked the code in other databases i have on the same
development system and it correctly finds the date as dd/mm/yyyy.

why or what have i done to this particular database

any help please

Code:
Me![fSubSearchBuyingDetails].Form.Filter = "[BuyingDate] Like #" &
txtCriteria & "#"
Nov 13 '05 #1
1 1687
See:
International Date Formats in Access
at:
http://members.iinet.net.au/~allenbrowne/ser-36.html

The article explains that you must use mm/dd/yyyy for literal dates within
SQL strings and VBA, so that your application works the same anywhere on the
planet. In the interface, though, you enter dates the way they are defined
in the Windows Control Panel.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"DD" <da**********@bigpond.com.au> wrote in message
news:14**************************@posting.google.c om...
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 all other dates read as dd/mm/yyyy.
Why has this started to happen.
I have added a new txtCriteria and this did not fix it, i have checked
all daste formats they are correct.

I have checked the code in other databases i have on the same
development system and it correctly finds the date as dd/mm/yyyy.

why or what have i done to this particular database

any help please

Code:
Me![fSubSearchBuyingDetails].Form.Filter = "[BuyingDate] Like #" &
txtCriteria & "#"

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

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...
4
by: yasaswi | last post by:
Now that MySQL 5.0.15 is production ready, are there any functions to use with mysqlimport, so I can load a string such as, MM/dd/yy, in a text file into a MySQL database as a yyyy-MM-dd date...
6
by: kevin carter | last post by:
hi i have a table conataining several fields one of which is date i want to be able to search the table on the date field using code. the code below generates the query from a form, however i get...
4
by: Tony | last post by:
Hey guys, I use Google Groups quite a bit as it is an enormous wealth of information, and now I need some help. I have created a query using parameters to capture a range of date, the date is...
2
by: Tony | last post by:
Hello everyone, Okay so here is my pickle! I have a field called ARCH_DATE within a table which has a date stored like "9/1/2004 23:50:00". What I would like to do is create a date range which...
7
by: Jerome | last post by:
Hallo, I know a lot has already been told about date/time fields in a database but still confuses me, specif when dealing with SQLserver(Express). It seems that sqlserver only accepts the date in...
4
by: keithsimpson3973 | last post by:
Please forgive me for being so stupid. I have searched this site and many others for what should be a simple thing. I have a vb 6 form with a textbox that I input a date into. I can't set the format...
7
by: Katherine | last post by:
I'm trying to filter the records on the mainform (MailingList) of my database using a field contained in a subform (Donations). I was basing my code off Allen Browne's Access Tips page (here:...
1
by: Thorben Grosser | last post by:
Hey again newsgroup, I am still working on an archive database and got another problem: I have to classify the folders by a date or a date range which has the format mm/yyyy I got the feeling,...
4
by: =?Utf-8?B?ZGNoMw==?= | last post by:
Is there a way to conditionally format a dateTime field to produce on result if the value is 10/31/2008 12:00 AM (user didn't enter a time) and another result if the value is 10/31/2008 5:30 PM...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.