Format no longer works under Vista?

  • Thread starter Thread starter Bitz
  • Start date Start date
B

Bitz

I output a textbox with =Format($[MyDate],"mmm yyyy") which works fine, and
has for several years, under a computer running XP but under under Vista it
interprets Format$ (or Format) as a Parameter and then yields an error in
the output. Both computers are side by side running Access 2003
(11.8166.8221) SP3. Is MS trying to tell me I have to upgrade my Access if
I run Vista?
 
Replace your expression:
=Format($[MyDate],"mmm yyyy")
with
=Format([MyDate],"mmm yyyy")
 
Duane, sorry about my typo. I meant Format$([MyDate]...... and also have
tried Format([MyDate]...... With Format or Format$ I get the same dialog on
running the report - "Enter parmeter value" which means to me it is not
interpreting the =Format as a function but as a missing parameter. My
backup computer running a copy of the program, but under XP, displays the
month and year as instructed.

I did not give you the specific location of this usage becuase the only
difference is my now trying to run on a new computer under Vista. I
obviously had to install Office 2003 on the new computer and as noted in my
original posting did update completely. That location is in a Group Header
created under Sorting and Grouping of MyDate.

Ed

Duane Hookom said:
Replace your expression:
=Format($[MyDate],"mmm yyyy")
with
=Format([MyDate],"mmm yyyy")

--
Duane Hookom
Microsoft Access MVP


Bitz said:
I output a textbox with =Format($[MyDate],"mmm yyyy") which works fine,
and
has for several years, under a computer running XP but under under Vista
it
interprets Format$ (or Format) as a Parameter and then yields an error in
the output. Both computers are side by side running Access 2003
(11.8166.8221) SP3. Is MS trying to tell me I have to upgrade my Access
if
I run Vista?
 
I expect this is a references issue. You might want to open the VBA code
window and check for missing references.

--
Duane Hookom
Microsoft Access MVP


Bitz said:
Duane, sorry about my typo. I meant Format$([MyDate]...... and also have
tried Format([MyDate]...... With Format or Format$ I get the same dialog on
running the report - "Enter parmeter value" which means to me it is not
interpreting the =Format as a function but as a missing parameter. My
backup computer running a copy of the program, but under XP, displays the
month and year as instructed.

I did not give you the specific location of this usage becuase the only
difference is my now trying to run on a new computer under Vista. I
obviously had to install Office 2003 on the new computer and as noted in my
original posting did update completely. That location is in a Group Header
created under Sorting and Grouping of MyDate.

Ed

Duane Hookom said:
Replace your expression:
=Format($[MyDate],"mmm yyyy")
with
=Format([MyDate],"mmm yyyy")

--
Duane Hookom
Microsoft Access MVP


Bitz said:
I output a textbox with =Format($[MyDate],"mmm yyyy") which works fine,
and
has for several years, under a computer running XP but under under Vista
it
interprets Format$ (or Format) as a Parameter and then yields an error in
the output. Both computers are side by side running Access 2003
(11.8166.8221) SP3. Is MS trying to tell me I have to upgrade my Access
if
I run Vista?
 
Duane, the suggestion of a missing reference sure sounded logical but not
so. My backup copy on the XP has the same six references in the same order.
I sure hope you can come up with another idea. I wrote this Quicken's like
replacement for my checkbook and it has served me well for many years -
hate to see an old friend die for something as weird as this.

Just renamed the file on my XP, copied it again over to my computer running
Vista and iagain failure - it just cannot run under Vista. That might make
sense to me if the whole program did not load but one small function. I
think every other form, query, module and report and there are pot full all
work, just this one function where I wanted to list by the spelled out
month.

Ed
 
I have to agree with Duane: it sure sounds like a problem with your
References collection.

If none of the selected references have "MISSING:" in front of them, select
an additional reference at random, back out of the dialog, then go back in
and unselect the reference you just added. If that doesn't solve the
problem, try to unselect as many of the selected references as you can
(Access may not let you unselect them all), back out of the dialog, then go
back in and reselect the references you just unselected. (NOTE: write down
what the references are before you delete them, because they'll be in a
different order when you go back in)

If that still doesn't work, what are the 6 selected references?
 
Unbelievable, at least to me. I followed Doug's first instruction, checking
another reference (I chose Microsoft Office 11.0 Object Library), backed out
and actually closed Access. Started again, opened the file, removed the
reference, again backed out and closed Access. Upon starting again the code
worked perfectly.

I have been retired for 16 years, and probably did most of my Access coding
since that time - self taught by reading a lot of books and manuals and
bothering professionals like yourselves on the tech forums. I really
appreciate. If you have another few minutes what did the procedure offered
actually correct? Is Vista at all involved, or the cause simply copying to
another computer? I have copied this file several times over the years to
new computers with new MS OS's and suspect this particular code was there
early on.

Again, thanks so much.

Ed
 
What you did caused Access to refresh its references. Some references Access
is able to correct on its own, some it can't.

I don't really think Vista itself is to blame. The fact is, Access is kind
of picky, wanting the version of all referenced libraries to be in the same
place (and the same version) on the target machine as on the machine where
the application was built. Lots of things can cause the referenced libraries
to be different. Yes, moving to a different OS is certainly a good bet to
cause differences, but just installing another application on the same
machine as where the application was developed can cause this problem as
well.

That's one of the reasons I try to minimize the References collection, using
Late Binding as much as possible.

For far more than you could ever want to know about this problem, check out
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html, or check my
December, 2003 "Access Answers" column in Pinnacle Publication's "Smart
Access" (you can download the column, and sample database, for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html)
 
Doug, Appreciate the follow up and understand the "model" although
certainly not the fine technical detail. I did some more searching,
thinking I remembered your name from back a ways, and came up with a
reference I had saved:
http://members.rogers.com/douglas.j.steele/AccessIndex.html which no longer
is active. So looks like I depended on you in the past at one or more
times. Will reread several times your detail on "references" and have
added your papers on the multitude of Access subjects to my file.

Have done little Access programming in the last few years other than
maintenance and minor improvements in existing programs. I can only come up
with so many ideas where relational databases have value for an old retired
guy. I have this "Quicken's" replacement, an elaborate "projected and
actual income/asset program," a fancy directory for our 55 and older
community, a database detailing my software (location of CD's, downloads,
etc) and a few others but have run out of ideas. Spending more time with
Net's VB Basic but even there you can write only so many utilities for
yourself and a few friends. Biggest problem lately is locating something
about my new computers Vista OS that is an improvement (as they say in my
computer experience) over XP. I guess I will have to come out of retirement
to have some fun -- no way.

Thank you and all the forum regulars.

Ed
 
Back
Top