Can't insert current date - "error compiling this function" or #Na

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report where I attempted to insert the current date using
Insert|Date and Time from the menu bar. When previewing the report the date
field outputs #Name?

I then tried to tweak the text box by changing =Date() to =Now(), manually
typing =Date() rather than picking it from the menu bar, etc., etc. When I do
that and try to exit the Control Source line, I get the message “There was an
error compiling this function.â€

Just for experimentation purposes I also tried inserting a text box and
using the function =CurrentUser() [chose it from the Common Expressions in
the Expression Builder]. I got the same message as above: ….error compiling
this function.

I’ve seen numerous posts attributing the problem described in paragraph 1 to
a missing reference. I tried the various suggested fixes and they didn’t
work. Any other ideas out there?

Can anyone tell me what reference should be checked in order to use the
Now() and//or Date() functions?

Thanks.
 
Do you have a field named Date or Time in your report's record source? Does
your report run correctly without the date/time?

Does this happen with all reports (and forms)? Does this happen in all MDBs?

I would have to think this is an issue with references.
 
Hi Duane.
No, there are no fields named Date or Time in the report's record source.
Yes, the report runs correctly without the date/time.
Yes, it happens on all reports/forms within this .mdb
But No, it doesn't happen in other .mdb's.

Thanks,
Billie

-----------------------------------------------------------------
Duane Hookom said:
Do you have a field named Date or Time in your report's record source? Does
your report run correctly without the date/time?

Does this happen with all reports (and forms)? Does this happen in all MDBs?

I would have to think this is an issue with references.

--
Duane Hookom
MS Access MVP
--

BKE said:
I have a report where I attempted to insert the current date using
Insert|Date and Time from the menu bar. When previewing the report the
date
field outputs #Name?

I then tried to tweak the text box by changing =Date() to =Now(), manually
typing =Date() rather than picking it from the menu bar, etc., etc. When I
do
that and try to exit the Control Source line, I get the message "There was
an
error compiling this function."

Just for experimentation purposes I also tried inserting a text box and
using the function =CurrentUser() [chose it from the Common Expressions in
the Expression Builder]. I got the same message as above: ..error
compiling
this function.

I've seen numerous posts attributing the problem described in paragraph 1
to
a missing reference. I tried the various suggested fixes and they didn't
work. Any other ideas out there?

Can anyone tell me what reference should be checked in order to use the
Now() and//or Date() functions?

Thanks.
 
I would go back into a module and check the references. You should have
Visual Basic for Applications
MS Access Object Library
OLE Automation
maybe MS ADO or DAO
Uncheck and then re-check the references.

--
Duane Hookom
MS Access MVP
--

BKE said:
Hi Duane.
No, there are no fields named Date or Time in the report's record source.
Yes, the report runs correctly without the date/time.
Yes, it happens on all reports/forms within this .mdb
But No, it doesn't happen in other .mdb's.

Thanks,
Billie

-----------------------------------------------------------------
Duane Hookom said:
Do you have a field named Date or Time in your report's record source?
Does
your report run correctly without the date/time?

Does this happen with all reports (and forms)? Does this happen in all
MDBs?

I would have to think this is an issue with references.

--
Duane Hookom
MS Access MVP
--

BKE said:
I have a report where I attempted to insert the current date using
Insert|Date and Time from the menu bar. When previewing the report the
date
field outputs #Name?

I then tried to tweak the text box by changing =Date() to =Now(),
manually
typing =Date() rather than picking it from the menu bar, etc., etc.
When I
do
that and try to exit the Control Source line, I get the message "There
was
an
error compiling this function."

Just for experimentation purposes I also tried inserting a text box and
using the function =CurrentUser() [chose it from the Common Expressions
in
the Expression Builder]. I got the same message as above: ..error
compiling
this function.

I've seen numerous posts attributing the problem described in paragraph
1
to
a missing reference. I tried the various suggested fixes and they
didn't
work. Any other ideas out there?

Can anyone tell me what reference should be checked in order to use the
Now() and//or Date() functions?

Thanks.
 
Thanks, Duane, for your help with this. Unfortunately the problem still
exists.

I could not uncheck Visual Basic for Applications or MS Access Object
Library. I did uncheck the others, then re-checked OLE Automation and DAO.
Still getting #Name? and "There was an error compiling this function."

If you have any other ideas, I'd be happy to hear them. Thanks.

===================================

Duane Hookom said:
I would go back into a module and check the references. You should have
Visual Basic for Applications
MS Access Object Library
OLE Automation
maybe MS ADO or DAO
Uncheck and then re-check the references.

--
Duane Hookom
MS Access MVP
--

BKE said:
Hi Duane.
No, there are no fields named Date or Time in the report's record source.
Yes, the report runs correctly without the date/time.
Yes, it happens on all reports/forms within this .mdb
But No, it doesn't happen in other .mdb's.

Thanks,
Billie

-----------------------------------------------------------------
Duane Hookom said:
Do you have a field named Date or Time in your report's record source?
Does
your report run correctly without the date/time?

Does this happen with all reports (and forms)? Does this happen in all
MDBs?

I would have to think this is an issue with references.

--
Duane Hookom
MS Access MVP
--

I have a report where I attempted to insert the current date using
Insert|Date and Time from the menu bar. When previewing the report the
date
field outputs #Name?

I then tried to tweak the text box by changing =Date() to =Now(),
manually
typing =Date() rather than picking it from the menu bar, etc., etc.
When I
do
that and try to exit the Control Source line, I get the message "There
was
an
error compiling this function."

Just for experimentation purposes I also tried inserting a text box and
using the function =CurrentUser() [chose it from the Common Expressions
in
the Expression Builder]. I got the same message as above: ..error
compiling
this function.

I've seen numerous posts attributing the problem described in paragraph
1
to
a missing reference. I tried the various suggested fixes and they
didn't
work. Any other ideas out there?

Can anyone tell me what reference should be checked in order to use the
Now() and//or Date() functions?

Thanks.
 
Have you attempted to compile the code in the MDB? Are there any modules
that are the same name as a function?

--
Duane Hookom
MS Access MVP


BKE said:
Thanks, Duane, for your help with this. Unfortunately the problem still
exists.

I could not uncheck Visual Basic for Applications or MS Access Object
Library. I did uncheck the others, then re-checked OLE Automation and DAO.
Still getting #Name? and "There was an error compiling this function."

If you have any other ideas, I'd be happy to hear them. Thanks.

===================================

Duane Hookom said:
I would go back into a module and check the references. You should have
Visual Basic for Applications
MS Access Object Library
OLE Automation
maybe MS ADO or DAO
Uncheck and then re-check the references.

--
Duane Hookom
MS Access MVP
--

BKE said:
Hi Duane.
No, there are no fields named Date or Time in the report's record
source.
Yes, the report runs correctly without the date/time.
Yes, it happens on all reports/forms within this .mdb
But No, it doesn't happen in other .mdb's.

Thanks,
Billie

-----------------------------------------------------------------
:

Do you have a field named Date or Time in your report's record source?
Does
your report run correctly without the date/time?

Does this happen with all reports (and forms)? Does this happen in all
MDBs?

I would have to think this is an issue with references.

--
Duane Hookom
MS Access MVP
--

I have a report where I attempted to insert the current date using
Insert|Date and Time from the menu bar. When previewing the report
the
date
field outputs #Name?

I then tried to tweak the text box by changing =Date() to =Now(),
manually
typing =Date() rather than picking it from the menu bar, etc., etc.
When I
do
that and try to exit the Control Source line, I get the message
"There
was
an
error compiling this function."

Just for experimentation purposes I also tried inserting a text box
and
using the function =CurrentUser() [chose it from the Common
Expressions
in
the Expression Builder]. I got the same message as above: ..error
compiling
this function.

I've seen numerous posts attributing the problem described in
paragraph
1
to
a missing reference. I tried the various suggested fixes and they
didn't
work. Any other ideas out there?

Can anyone tell me what reference should be checked in order to use
the
Now() and//or Date() functions?

Thanks.
 
Back
Top