RE: Day() function - fine in one form, Error 2465 on another.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for the quick reply!
I've taken to using Int(Now()) in place of Date() because when I gave the
file to a friend, Date() didn't work. Poked around the forums and found that
others had the same problem - Now() worked fine, but Date() didn't. The
advice realted to referencing errors which was really ugly to fix, given that
the friend is in another country. Using the Int solved THAT problem very
simply.

'Defatult' doesn't seem to be the problem (but I can easily change that to
check), as when I put a watch on the value of Default, it's as it should be -
today's date, with format 'Date'. The debugger hangs up on the Day function
- seeking a field instead of just doing the function.

"Jack Leach" wrote:

I'm not sure if this is the problem or not, but just out of curiousity, why
use int() instead of standard a standard date or format function?

Also, I would guess that Default is a reserved word.

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)



"Helen" wrote:

Two forms need command buttons to do the same thing. The code was working
perfectly on one form, so copied it over to the other.

Get error 2465 = Can't find the field 'Day' in your expression.

Relevant code:
Dim Default as date
Dim DDay as integer

Default = Int(Now())
DDay = Day(Default) --------------this line is highlighted by the debugger

If today is the 15th of May, one form works fine: Default = 15/5/09, DDay = 15
The other form gives the error. Default shows as above, but "Day(Default)"
in the watch zone shows the error. There is no field called "Day" on the
second form.

I'm perplexed.
.



Relevant Pages

  • Re: AMA wants stinkwheels?
    ... And it was the end of one of my worst days of flying ever. ... but the standard of behavior was not ... exactly the same tone I would people in here who call me a friend. ... I think RMD is flatlined. ...
    (rec.motorcycles.dirt)
  • Re: Most cars in Europe have manual trannies?
    ... My friend used to have an auto-stick VW that I used to work on. ... The car was ... that would push in the clutch fork. ... The clutch was a standard dry type ...
    (rec.autos.tech)
  • Re: An Introduction: Recovery by Career Change
    ... are your friend. ... Especially when hidden inside a standard, ... harmless-looking permanent marker. ... back when I was a student. ...
    (alt.sysadmin.recovery)
  • Camcorder Advice
    ... So my friend now tells me that I won't be able to use his camcorder to ... So I am thinking of going with an HD camera rather than "standard" ... to output your movies to an easily viewable high-definition format--often, ... supports HD and if it does whether I will be able to successfully output ...
    (rec.juggling)