Use text box to call Function

W

Wobble

Hi there

I created a module using the code from here:
http://www.mvps.org/access/api/api0008.htm and created a text box on a form
and changed the Control Source to =fOSUserName().

When I do this, the text box returns #Name?

Can anyone tell me what I've done wrong and how to correct it?

Much appreciated
Paul
 
G

Guest

Hi Paul,

I just tried this out, and it works fine for me. Have you checked for any
missing references?

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Hi there

I created a module using the code from here:
http://www.mvps.org/access/api/api0008.htm and created a text box on a form
and changed the Control Source to =fOSUserName().

When I do this, the text box returns #Name?

Can anyone tell me what I've done wrong and how to correct it?

Much appreciated
Paul
 
W

Wobble

Hi Tom

I thought the dll was a standard OS dll?

I don't know what library's I'm supposed to reference, unfortunately. Could
you tell me which ones you use and I can try them out?

Thanks
Paul

Hi Paul,

I just tried this out, and it works fine for me. Have you checked for any
missing references?

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Hi there

I created a module using the code from here:
http://www.mvps.org/access/api/api0008.htm and created a text box on a form
and changed the Control Source to =fOSUserName().

When I do this, the text box returns #Name?

Can anyone tell me what I've done wrong and how to correct it?

Much appreciated
Paul
 
A

Arvin Meyer [MVP]

The API used is a standard one, but reference problems can be caused by any
missing reference. The references that are normally standard are:

VBA
MS-Access (version)
OLE
Either ADO or DAO depending upon your version

If there is any reference that is undefined or ambiguous (like the ADO/DAO
one) you'll have the problem. Read the 2 articles that Tom posted for
specific information.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

Hi Paul,

The file "advapi32.dll" is considered a Win 32 core component, so you should
have a copy of this .dll file on your PC:

http://support.microsoft.com/dllhelp/?dlltype=file&l=55&alpha=advapi32.dll&S=1&x=4&y=9

You don't need any special references. You just need to verify that you
don't have any references marked as "MISSING", because if you do, no VBA code
will run properly. Press ALT F11 to open the VBE editor. Click on Tools >
References. You should not see any references marked as MISSING. If you do,
you need to fix that problem.

Tom
__________________________________________

:

Hi Tom

I thought the dll was a standard OS dll?

I don't know what library's I'm supposed to reference, unfortunately. Could
you tell me which ones you use and I can try them out?

Thanks
Paul
__________________________________________


Hi Paul,

I just tried this out, and it works fine for me. Have you checked for any
missing references?

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Hi there

I created a module using the code from here:

http://www.mvps.org/access/api/api0008.htm and created a text box on a form
and changed the Control Source to =fOSUserName().

When I do this, the text box returns #Name?

Can anyone tell me what I've done wrong and how to correct it?

Much appreciated
Paul
 

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