473,385 Members | 2,028 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,385 software developers and data experts.

Non expert doing things that aren't that hard but are beyond me

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?
Apr 18 '07 #1
4 1158
please anybody?
Apr 19 '07 #2
Rabbit
12,516 Expert Mod 8TB
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#
Apr 19 '07 #3
thanks, still can't get it but have more ideas.
Apr 20 '07 #4
Rabbit
12,516 Expert Mod 8TB
Oh, and also, your criteria is in the wrong place, it should be the fourth parameter.
Apr 20 '07 #5

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

Similar topics

15
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...
4
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...
9
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
27
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...
48
by: mai | last post by:
wherefrom can I download it? --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from...
0
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,...
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:
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
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,...

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.