473,765 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open form showing only Dates in the future

2 New Member
Hi,

I have a form called "2_Form_Courses " and in my menu I open the same form, just applying different filters.

My upcoming courses button doesn't work with dates properly

When I run this today (1st March) it should only show 2 records, for the 27th April and 25th May
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "2_Form_Courses", acNormal, , "[Date] > #" & Now() & "#"
  2.  
It worked ok until recently, but now also shows 17 Feb 2008 (which is in the past) and I cannot understand why.
Mar 1 '08 #1
2 1484
JKing
1,206 Recognized Expert Top Contributor
Hi,

I have a form called "2_Form_Courses " and in my menu I open the same form, just applying different filters.

My upcoming courses button doesn't work with dates properly

When I run this today (1st March) it should only show 2 records, for the 27th April and 25th May
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "2_Form_Courses", acNormal, , "[Date] > #" & Now() & "#"
  2.  
It worked ok until recently, but now also shows 17 Feb 2008 (which is in the past) and I cannot understand why.
Try this instead:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "2_Form_Courses", acNormal, , "[Date] > Date()"
  2.  
Mar 1 '08 #2
wb228
2 New Member
Many thanks,

That did it.
Mar 2 '08 #3

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

Similar topics

1
1553
by: David B | last post by:
In a reservations app I have a sub form (in datasheet view) that displays dates in desc order. As these dates are both in the past and present I would like current dates to appear when the form opens. ie. scroll up for future and down for past. Slight problem is that today may not be in the list. (Could be closed every Friday) Any thoughts on how to deal with this ? TIA
2
1802
by: Arnold | last post by:
Greetings Gurus, In a report showing the names of students and their progress, I am getting an error in the name field (Name: #Error). The report gets its data from an unbound form containing two unbound textboxes, "txtStartDate" and "txtEndDate," and a multi-select listbox, "listName." I think the error occurs when there is no correct combination of data--for instance, no records for John Doe entered during this past week.
1
2623
by: John Phelan-Cummings | last post by:
When I add the name of a new individual in a, bound form, it will not display that person’s name in a label control of a second unbound form. I have a scheduling program that I am working on. Included in the application program is a data “GRID” which I believe was created using Visual Basic, not standard Access. Its purpose is to display the results of a range of “from-to-dates” of registrations for different clients. The difficulty...
1
1840
by: joeyej | last post by:
I'm using this code to make sure users are unable to choose a date from a drop list (<option value="June 8, 2006, (Thursday), 9am">June 12, 2006, (Thursday), 9am) that is less than two days out from the system date. How can I improve it to be sure weekends are excluded? I also need to make sure end of month/begin new month is included in choices being at least 2 days away from system date - . Any help is appreciated. Thanks, Joe
0
1168
by: Michael Sparks | last post by:
Hello, I'd like to invite you to our first Kamaelia Open Space event. Our theme is "Making Software like Lego through intuitive useful concurrency". Perhaps you want to learn to use Kamaelia, or you're already using it, or you're simply interested in code reuse or concurrency being actually
5
5484
by: BD | last post by:
I am coding with C# in Visual Studio 2005 for a database application residing on remote MS SQL Server 2005. What I want to do is open the same form but from 2 different places and only one instance. I currently have the form where it will open from a double click on datagridview from another form to the proper record and only one instance. However, doing this bypassed by databinding source for opening the form to all records. I still...
7
6561
by: GraemeC | last post by:
I have a form (single record form) that loads records from a query that are sorted date order as the records are viewed in date order. Some dates are in the past and some are in the future. Currently the form opens on the last record and the date of that record can be 6 months out. The users would like the form to open on the record closest to the current date. Does anyone know how I can achieve this? Thanks
10
1347
by: Lindie | last post by:
We have an Access sickness tracker. The form FrmDetails&sick shows a subform with the dates of the sickness absences. The dates are not showing in chronological order. I just cannot work out why. Any help would be greatly valued. Lindie
5
1639
by: thecheyenne | last post by:
Hi there and happy new year to all of you. I've been reading the thread "Auto Date in form "pages" from 'frys' in the topics and his/her problem is similar though not identical to mine. Here is my database structure which works, crudely, but I'd like to re-fine it, if possible, so feel free to give your 2-pence on my design effort My 'journal' is actually a time-table for an educational establishment. It relates to my lessons over the week,...
0
9404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.