Problem experienced in runtime in roaming profile environment with some
users only.
Specifically. opening a form with a user defined date filter fails.
Well, it sounds like a broken reference, or your might have a date format
setting problem. Often, on a problem machine, you will find out that the
user has changed he date format. Your code might expect mm/dd/yyyy, and the
user has it set to
d/m/yyyy
So, you might want to check how that filter code works.
The application runs in runtime on my computer no problem.
Ok...good, you tested the /runtime switch..and that is nice to get that
problem out of the way.
Problem occurs only with some users and not others.
Do you mean some users on he SAME computer...are you talking about a
different computer?
Have not tried MDE as the application is not working - should this really
make a difference - does this not just protect the code?
Well, it means you have made at least a MINIMAL effort to determine that
your code compiles. It means that you at least make a lame effort to ensure
that your code does not go out the door with compile errors. We don't want
to send out an application with compile errors...do we? I could ask if your
code compiles...but by asking you if you are using a mde, then it means you
do take some efforts to ensure your code compiles before you sent it out.
So, I could rephrase the question...and ask does your code have any compile
errors? Worse, are you perhaps sending out a application that is not
compiled for those users (this can be a source of bloat..or additional
problems due to code "trying" to compile as it runs. Really, a dumb thing to
have happen, and you can avoided this by simply adopting a policy of
distributing a mde. Those mdes are smaller, run faster..and can't become
un-compiled state like a mdb with the source code in it).
So, since this *might* be a date issue, we narrowed it down to a best guess
of references. However, you seem to hint that some users on the SAME
computer work...and some don't....so, the next best guess would be the users
"date" settings in the control panel.
You need to ensure that your code does NOT care about the users internal
date settings. That means that users can change their default date format in
the windows panel, but YOU MUST ALWAYS use the USA format in your code. That
means:
strFilter = "InvoiceDate between #" & format(dtStart,"mm/dd/yyyy") & "# " &
_
" and #" & format(dtEnd,"mm/dd/yyyy") & "#"
Note how we use the format command to "cast" the fomrat of the date to USA
format.....