Date format and Trim function errors

G

Guest

I have an application which uses Format functions in text boxes on forms. It
is used by approximately 90 users at this location, but users at another
location see the "#Name?" error rather than the data in the textbox. We are
on the same version of MSOffice, MSAccess and Windows XP.

In some instances, the format function is entered in the properties box
under Default Value - "Format(Now(),"mm/dd/yyyy")
In other instances the DataSource concatonates data from several
fields"=Trim(CompanyName) & " " & City & ", " & State"
where CompanyName, City, and State are fields.

The data displays correctly if, on the form load event, I code "textbox1 =
format(now(),"mm/dd/yyy").

I could replace the date format using the format property (these were the
first forms I ever created and I didn't know about the format property then)
or perhaps vba code but the application has numerous forms and procedures
which use format functions - correcting every instance would require a huge
coding and testing effort and cannot be addressed at this time.

I appreciate any help.
 
D

Douglas J. Steele

The References collection is probably messed up.

References problems can be caused by differences in either the location or
file version of certain files between the machine where the application was
developed, and where it's being run (or the file missing completely from the
target machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", 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)
 
G

Guest

I keep meaning to send you a note - Thanks, I found the reference and
corrected the problem. After several months of pulling my hair out!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top