By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

Why am I getting a #Name?

100+
P: 443
My reports have a =date() and =time() in the headings to show when the report was run. However on some computer when the report is run those fields show up with the #Name? I'm sure it has something to do with a reference being missing but which one?

Thanks
Jun 19 '19 #1

✓ answered by NeoPa

If you go to the VBA IDE window (Alt-F11 from Access window) then press F2 to display the Object Browser then you should see theObject Browser window.

Using Tools \ References you should see all the libraries for the project listed. The one at the very top should always be "Visual Basic For Applications" and will not be de-selectable. In the status box at the bottom of this pop-up is the name as well as Location & Language. You've probably already seen that many locations are too wide to be displayed fully except in the newer versions where this window is expandable. Can be frustrating.

However, if you close that and select VBA from the higher of the two ComboBoxes at the top-left of the Object Browser you'll see the same location displayed in the status box at the bottom of that window. As this window is fully resizable even in quite old versions, you should be able to see the full path of the file. If the window is too small then it wraps in the box and the box has a vertical scrollbar so all info is visible even if you have to scroll in some extreme circumstances. You can even copy and paste the information into somewhere it's easier to see, or even into Windows Explorer to navigate directly there. All very flexible and powerful.

An easy way to get to this is :
Ctrl-G Go to Immediate Pane.
Date Type it out.
Shift-F2 Press with cursor on name of Function.
VBA.DateTime Click on VBA in status box at bottom.

Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,494
Hi Tom.

Date() and Time(), as well as Now(), all come from the VBA library. I'm pretty sure that this particular library is not optional and is available for all projects.

I can't think of a reason why it would show on some machines but not others - not unless the whole of VBA wasn't installed with Office, but that would be very unusual in my experience.
Jun 19 '19 #2

100+
P: 443
Where is the VBA Library? In my references I have Microsoft Visual Basic for Applications Extensibility 5.3, I also have Microsoft office 16.0 Access database engine Object Library. I'm wondering if this could be the problem as not everybody has Office 16.0. I can't tell what the file is because the file location only shows C:\program files (x86)\Microsoft Office\Root\VFS\programfile that's where it stops and I can't figure out how to show me the complete file location. Is this a .dll or .olb the individual that is having the problem I know for a fact that she doesn't have office 16.
Your help is always appreciated. I'm not to sure how clear I've been in this reply of if you need more information let me know.
Jun 19 '19 #3

NeoPa
Expert Mod 15k+
P: 31,494
If you go to the VBA IDE window (Alt-F11 from Access window) then press F2 to display the Object Browser then you should see theObject Browser window.

Using Tools \ References you should see all the libraries for the project listed. The one at the very top should always be "Visual Basic For Applications" and will not be de-selectable. In the status box at the bottom of this pop-up is the name as well as Location & Language. You've probably already seen that many locations are too wide to be displayed fully except in the newer versions where this window is expandable. Can be frustrating.

However, if you close that and select VBA from the higher of the two ComboBoxes at the top-left of the Object Browser you'll see the same location displayed in the status box at the bottom of that window. As this window is fully resizable even in quite old versions, you should be able to see the full path of the file. If the window is too small then it wraps in the box and the box has a vertical scrollbar so all info is visible even if you have to scroll in some extreme circumstances. You can even copy and paste the information into somewhere it's easier to see, or even into Windows Explorer to navigate directly there. All very flexible and powerful.

An easy way to get to this is :
Ctrl-G Go to Immediate Pane.
Date Type it out.
Shift-F2 Press with cursor on name of Function.
VBA.DateTime Click on VBA in status box at bottom.
Jun 20 '19 #4

Post your reply

Sign in to post your reply or Sign up for a free account.