Date field won't format properly

  • Thread starter Thread starter Shirley Jones
  • Start date Start date
S

Shirley Jones

I have a compiled database (Access 2000-executing Visual
Basic) executing on a network drive. We copied it to a
different drive for others to use. Once moved to the new
drive, I can still use the database but the new person
can't run it from their machine.
A date should display on the opening screen but #Name?
displays where the date should be and the following error
message displays:
"The expression ON Click you entered as the event property
setting produced the following error: *The expression may
not result in the name of a macro, the name of a user-
defined function, or [Event Procedure]. *There may have
been an error evaluating the function, event or macro"
We think the person is missing something on their machine
but we can't figure out what.
 
Shirley Jones said:
I have a compiled database (Access 2000-executing Visual
Basic) executing on a network drive. We copied it to a
different drive for others to use. Once moved to the new
drive, I can still use the database but the new person
can't run it from their machine.
A date should display on the opening screen but #Name?
displays where the date should be and the following error
message displays:
"The expression ON Click you entered as the event property
setting produced the following error: *The expression may
not result in the name of a macro, the name of a user-
defined function, or [Event Procedure]. *There may have
been an error evaluating the function, event or macro"
We think the person is missing something on their machine
but we can't figure out what.

You probably have a references problem. Am I right in understanding
that this is an MDE file, not an MDB? If it were an MDB file, fixing
the broken reference would be easy, but with an MDE it's not so simple
because you can't get into the References dialog. There are three
approaches to fixing the problem that I can think of:

1. The complicated approach is to write code in the application itself
to execute at startup and fix and bad references. This is a tricky
business that I've never tried, and I don't know for sure whether it
works with MDEs or not.

2. Find out what object or library is "differently installed" on the odd
user's machine, and forcibly install it where the application expects to
find it. You can check the references on each PC by opening the MDE
file, pressing Ctrl+G to get to the immediate window, and entering the
following line in the Immediate Window:

for each r in References : ?r.IsBroken, r.Name, r.FullPath : next r

That should help you identify what should be where. Note that it's
often the case that a library is installed on the user's system, but not
in the same place as the application is expecting it. In such a case,
it may be simply a matter of copying it to the expected location, or you
may also have to register it using regsvr32 -- I'm not sure.

3. Another approach, if you have access to the original MDB file from
which the MDE was created, is to copy the MDB file to the user's
machine, fix the broken references using the VB Editor's Tools ->
References... dialog, then create an MDE file from that copy, deleting
the MDB file when you've verified that the MDE file now works.

For lots more information about references, see this page:


http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 
Back
Top