Date() works for me, but gives #Name? for her

H

Helen

I sent a file to a friend (ACCDE version), and when she clicks to open a form
with a date textbox (new record, default = Day() ) she gets this pop-up
message:

"Function is not available in experessions query expression 'Date('"
and #Name? apparers in the text box.

When she uses the little calendar beside the text-box, she gets this message:
"Function is not available in expressions in table-value validation
expression."

Then she clicks OK on that pop-up and uses the calendar thingo again, and is
able to put in a date.

She sent the file back to me, and I have no such problem at my end.
Any suggestions? I'm in Australia, she's in the US, and the date is
formatted as Medium-Date.

If I can't sort this out, the file will be very annoying for her to use.
Any suggestions?

Thankyou in advance!! :)
 
H

Helen

Thankyou for replying so quickly.
It's after midnight for me now, but I'll be reading that reference you gave
me tomorrow!! I'd gathered that references COULD be the problem - from
searching forums and finding similar problems. I've already asked my friend
to send me the status of her references (with instructions how to get there -
she's stictly and end-user!)
Thanks again for that link.
Helen :)
 
H

Helen

This is just for anyone wrestling with a similar referencing problem. The
referencing articles I found were a bit beyond me, but the following seems to
have fixed the problem:

Int(Now()) takes just the integer part of the Now() function which is just
the current date. The other computers didn't recognise the Date() function,
but DID recognise the Now(), so problem solved by simply replacing Date()
everywhere it appeared with Int(Now()). Easy fix!
 
R

Rick Brandt

This is just for anyone wrestling with a similar referencing problem.
The referencing articles I found were a bit beyond me, but the following
seems to have fixed the problem:

Int(Now()) takes just the integer part of the Now() function which is
just the current date. The other computers didn't recognise the Date()
function, but DID recognise the Now(), so problem solved by simply
replacing Date() everywhere it appeared with Int(Now()). Easy fix!

You did not fix the problem. You are merely avoiding a symptom. A
broken door is not fixed by deciding to go in and out through the window.
 
D

Douglas J. Steele

While you might have solved the specific problem you were having, you didn't
actually correct the problem that caused the symptom.

Any time an Access application works on one machine but not on another, or
an Access application that previously worked suddently stops working, the
first thing to do is check the References collection. (All Access databases
contain references, which are a way of referring to another application's or
project's type library. In general, you want to ensure that the files
referenced in an Access application exist in exactly the same location on
the client workstations as they did on the development workstation, and that
each referenced file is the same version on all workstations.)

Assuming you're not dealing with an MDE or ACCDE, open any code module, then
select Tools | References from the menu bar.

Examine all of the selected references (these will be the ones at the top of
the list with check marks beside them).

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 compiling the application, available on the
Debug menu), 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 will 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!)

Just so you know: the problem will occur even if the library that contains
the specific function that's failing doesn't have a problem.

If you are dealing with an MDE (or ACCDE) or the user(s) in question are
working with the Access run-time, there are some tips to follow at
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 

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