I'm sure this should be easy but cannot make it work.
I have a MS Access table containing consecutive dates and daily comments, which when opened in a form displays other info relating to that date.
simply put, fields are Date and Comment
I would like to have a menu button which opens the date form but opens it on the current date, displaying the relevant info for the date in question (or none if that is the case). The form works and I can navigate around the dates and it displays ok but I can't figure out how to make it automatically open on today's date.
I've tried:
stDocName = "DIARY_MAIN"
DoCmd.OpenForm stDocName, , , , , , "[DATES].[DATE]=" & date()
but it takes off the () and won't do it.
any ideas?
4 1158
I'm sure this should be easy but cannot make it work.
I have a MS Access table containing consecutive dates and daily comments, which when opened in a form displays other info relating to that date.
simply put, fields are Date and Comment
I would like to have a menu button which opens the date form but opens it on the current date, displaying the relevant info for the date in question (or none if that is the case). The form works and I can navigate around the dates and it displays ok but I can't figure out how to make it automatically open on today's date.
I've tried:
stDocName = "DIARY_MAIN"
DoCmd.OpenForm stDocName, , , , , , "[DATES].[DATE]=" & date()
but it takes off the () and won't do it.
any ideas?
First, don't name your fields/tables/controls after reserved words and functions in Access. They make things all screwy.
Second, date value are delineated by surrounding them with # #. As in #1/1/2005#
thanks, still can't get it but have more ideas.
Oh, and also, your criteria is in the wrong place, it should be the fourth parameter.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Don Vaillancourt |
last post by:
I do a lot of hiring for my company and a lot of the people I interview
say that they are experts at SQL queries, but when I give them something
simple just beyond the typical SELECT type of...
|
by: Tony Houghton |
last post by:
Can anyone recommend a good book for intermediate up to expert level?
I'm an experienced C programmer and I learnt Python from the "Learning
Python" O'Reilly book because it had good reviews. I was...
|
by: anonymous |
last post by:
Hi CLCers,
I want to know your opinion about the book: Expert C
programming-Deep C secrets by Peter Van Der Linden. Thanks
in advance.
Sha
|
by: Greg Smith |
last post by:
Hello, I have been given a programming task that falls into the "impossible"
category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.
I...
|
by: mai |
last post by:
wherefrom can I download it?
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
| |