> Please do not post separate copies of messages to different newsgroups. If
> your topic could fit into more than one, include all the newsgroups in the
[quoted text clipped - 33 lines]
>
> - Show quoted text -
>Anyway thanks for the feedback it does help, I'm not a programmer or a
>db administrator by any means but i think i know what you mean......
[quoted text clipped - 13 lines]
>Are any of these statments about right and which one would you
>recomend?
Both are wrong, unfortunately. Now() does NOT return today's date; it returns
the current date and time accurate to a few microseconds. And Day() doesn't
return a date, it returns a Long Integer day number - 17 today, 18 tomorrow, 1
in a couple of weeks - so it would not distinguish May 1, June 1 and July 1.
If you will be (very unwisely, in my opinion!!) storing DATA - a date - in the
tablename, then you must construct the SQL string entirely in code, using
(e.g.)
Format(Date(), "dd-MMM-yyyy")
to construct the string used as the table name. Much better would be to have
one pings table with a Date/Time field and use a Query selecting today's date,
or any desired date, from the table:
SELECT DataReading FROM tblDate
WHERE [datefield] = Date()
ORDER BY ID;
If you object that the table is too large if you store all the records in one
table, bear in mind that in Access all the data is stored in one database
ANYWAY - whether that data is stored in one table or many tables does not
change that fact.
John W. Vinson [MVP]
Trev - 22 May 2007 14:18 GMT
On 18 May, 03:24, John W. Vinson <jvinson@STOP_SPAM.WysardOfInfo.com>
wrote:
> >Anyway thanks for the feedback it does help, I'm not a programmer or a
> >db administrator by any means but i think i know what you mean......
[quoted text clipped - 41 lines]
>
> - Show quoted text -
Hi,
Just to let you know
This was solved by using
"SELECT DateTaken, DataReading FROM tblData WHERE DateTaken =
Date()" , _
Thanks, for everyone's help.
Trev