function name that Microsoft Access can't find

  • Thread starter Thread starter Anth Stever
  • Start date Start date
A

Anth Stever

"The expression you entered has a function name that Microsoft Access can't find."

Horse pucky! The expression: =dropcombo() is in the On Enter property of a combo box.

The code resides in basUtilities and is:

public sub dropcombo()
screen.activecontrol.dropdown
end sub

This works fine in another copy of the DB on another PC. Any idea what the heck is wrong here?

TIA,

/\nth
 
Well, the first thing to check would be to open any module, and on the
module window's menu, Tools | References and fix any that are bad. A bad
reference can surely cause a problem with other references, but I must
admit, I never heard of it causing a problem with functions defined in the
same database.

So, if that doesn't fix the problem, post a followup here and maybe someone
else will have a suggestion to offer.

Larry Linson
Microsoft Access MVP

"The expression you entered has a function name that Microsoft Access can't
find."

Horse pucky! The expression: =dropcombo() is in the On Enter property of a
combo box.

The code resides in basUtilities and is:

public sub dropcombo()
screen.activecontrol.dropdown
end sub

This works fine in another copy of the DB on another PC. Any idea what the
heck is wrong here?

TIA,

/\nth
 
Anth Stever said:
"The expression you entered has a function name that Microsoft Access
can't find."

Horse pucky! The expression: =dropcombo() is in the On Enter
property of a combo box.

The code resides in basUtilities and is:

public sub dropcombo()
screen.activecontrol.dropdown
end sub

This works fine in another copy of the DB on another PC. Any idea
what the heck is wrong here?

Are you sure that dropcombo() is defined as a Sub and not as a Function?
To use it that way in an event property, the procedure must be a
Function, not a Sub.
 
Back
Top