What am I doing wrong? (1 Viewer)

DaveO

Registered User.
Local time
Today, 16:25
Joined
Oct 27, 2002
Messages
22
Can someone help me sort this problem

If I select the option to print weekly results, then it works fine for all weeks except 6 sept 03, and I dont know why.

The code is too large to attach here so I have uploaded it to my website at www.oram.me.uk

Hope someone can help

Dave
 
Sorry wrong address, try this

homepage.ntlworld.com/daveoram/football.mdb

Dave
 
Dave,

Well D. Padgett led with 19 points, which seems about right
considering other weeks. I don't know your data, so its a
little hard to tell.

What is is supposed to do (or not do)?

Wayne
 
Dave,

You did at one time have the report date "hard-wired" to
Sep. 6 in the Calc Points routine.

Wayne
 
The 'Hard-wired' reference was there for testing.

What happens when I select sept 6 is that the open recordset returns no values.

Interesting point is that when I put the program an a PC at work it would not generate a report for any of the dates, just said that there were no records returned.

One thing I have noticed through trial and error is that on my home PC it seems to generate reports for dates in which the day is greater than 9, suggesting that it may be a DATE formatting error in the select statement.

Dave
 
Set rstResults = dbOpenRecordset ("SELECT Results.*, Results.Date FROM Results WHERE (((Results.Date)=#" & PrintoutDate & "#));")

PrintoutDate is defined as type DATE

One other point, I have just changed my system settings to American English and the routine works fine. Change it back to British and it refuses to work on dates such as 06/09/03

Dave.

PS

Unable to respond any more until I get home later tonight (UK time)
 
Dates are stored by access in mm/dd/yy (US) format, try using Format(Printoutdate,"mm/dd/yy") to rectify that....

Regards

Note: It will work for dates like 13-09-2003
 
Bingo!!!!

That seems to have sorted the problem on my PC.

When I get to work I will try it on that one and see if it has solved the problem there.

Thanks to everyone for their help.

I only have one more problem at the moment, but I will browse the likely threads before I post it.

Dave
 
Yes, Thanks Namliam,

That format option worked fine on every PC itried the code on.

Thanks again for everyone who answered my request for help.

Dave
 

Users who are viewing this thread

Back
Top Bottom