Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Conversion / September 2004

Tip: Looking for answers? Try searching our database.

Problems with converted MDB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CPutnam - 20 Sep 2004 16:29 GMT
Hi, all.  We have a database application created in Access 97 that we are
trying to convert to Access 2002.  When I convert the file, it appears to go
without a problem.  But when I try to run it, it gives me the error "The
expression you entered has a function name that CLS Access Toolkit can't
find."  (CLSToolkit.mdb is the name of the .mdb file).  An  Autoexec macro
runs a function (and it is a function, not a sub) but when I call and step
through the function, everything goes fine.

I asked a colleague to do a conversion of the same application and then send
it to me.  He was able to convert without problems and was able to do some
simple operations within the converted application.  But when I copy it to
my computer, I get the exact same error I was getting when I converted it!

I have read and read and read the postings about this problem but just can't
find a good way to figure out what the problem is with my setup.  I've read
people's comments about not using an Autoexec macro (but since my colleague
has gotten this to work without a problem...), something about a Sandbox
mode (which I didn't think applied to my version of Access), other things
about missing references (nothing shows as missing and I've compared my
references with my colleague and they are the same), functions and commands
with the same names (which seemed to have been taken care of in Access97 so
I don't think that's the problem), and a lot of other things, some of which
I didn't understand.

I'm running I was hoping that someone could give me a basic idea of "all"
the places to check to find possible discrepancies.  I am about at the end
of my rope.

Thanks in advance.  Carol.
Allen Browne - 20 Sep 2004 16:50 GMT
Does your code compile in the new database? From the code window, choose
Compile on the Debug menu.

What happens if you add
   Stop
as the first line of your function?
When the database opens, the code will break there.
If it then continues okay, you have proved that you have a timing-sensitive
issue.

Here's a generic article on converting form A97:
   http://members.iinet.net.au/~allenbrowne/ser-48.html
It include a reference to Sandbox mode, explains the problems with Name
AutoCorrect, and the importance of SP3 for Office XP and SP8 for JET4.

Here's a generic article on references:
   http://members.iinet.net.au/~allenbrowne/ser-38.html
It is really important that you use the DAO 3.6 Library with A2002, not the
3.51 library you would have been using in A97.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi, all.  We have a database application created in Access 97 that we are
> trying to convert to Access 2002.  When I convert the file, it appears to
[quoted text clipped - 33 lines]
>
> Thanks in advance.  Carol.
CPutnam - 20 Sep 2004 19:23 GMT
Thanks, Allen.

Yes, my code compiled.

When I put Stop in as the first line of the function, I still get the error.

I'll read the articles you referred to and double check everything.  I'll
keep the group posted.

Cross your fingers for me!  Carol.

> Does your code compile in the new database? From the code window, choose
> Compile on the Debug menu.
[quoted text clipped - 53 lines]
> >
> > Thanks in advance.  Carol.
CPutnam - 20 Sep 2004 20:50 GMT
Hi, Allen.  In my earlier reply, I meant to say that I get the same error
message and that because I'm running the Autoexec macro, it comes up with
the name of the function as the location of the problem.

So what does that mean?

Thanks again.  Carol.

> Does your code compile in the new database? From the code window, choose
> Compile on the Debug menu.
[quoted text clipped - 53 lines]
> >
> > Thanks in advance.  Carol.
Allen Browne - 21 Sep 2004 02:39 GMT
Hi Carol

I don't know what's happening. If the application worked on your friend's
machine, but (with no changes) failed on your machine then something odd is
happening.

Presumably the function being called is in a standard module (not that of a
form), and has the word PUBLIC in front of the module declaration, i.e.:
   Public Function MyFunc()

Is it possible that you have 2 things with the same name? What is the name
of your function?

If the function has any error handling (e.g. "On Error ...") comment it out
until you solve this.

As a workaround, create a new (blank) form, and name it as your startup form
(Tools | Startup). Use its Open event to call the function. If that works,
the problem is with the AutoExec macro itself.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi, Allen.  In my earlier reply, I meant to say that I get the same error
> message and that because I'm running the Autoexec macro, it comes up with
[quoted text clipped - 77 lines]
>> >
>> > Thanks in advance.  Carol.
CPutnam - 21 Sep 2004 20:35 GMT
Why do I always end up with the esoteric problems?  ;-)

Anyways, I did create the workaround with a new form so I'm able to get into
the application.  (Interestingly, I was able to create an Autoexec macro so
it opens the form.  Then clicking the button on the form calls a generic
function that runs the steps that are normally run by the Autoexec macro.
BUT if I just put a RunCode command in the Autoexecc macro that calls the
generic function, I get the same error I was getting in the first place.)

(BTW since you asked -- The function originally called by the Autoexec macro
is called Public Function gfncStartupBeforeLogin(Optional ByVal fRestart As
Boolean = False).  I can't imagine any internal function having that
name...) .  When I comment out all the error checking in this function, I
still get the same error.)

I found something interesting which may be relevant to the whole problem --
Within the application there are buttons as well as custom menu items which
do the same thing (i.e. copy a query, filter a list, etc.).  Whenever I
choose an item from the drop down menus, I get the same "cannot find
function" error.  When I press the button that does the same thing, then the
code works fine and I don't get an error message.  I know that the menus run
macros.  I haven't checked them all but the ones that I have checked just
call different functions when clicked.

Since I'm getting the same error as I did when using an Autoexec macro to
RunCode, I'm wondering if all these macro problems are related.  Does this
ring any bells with anyone?

Thanks.  Carol.

> Hi Carol
>
[quoted text clipped - 97 lines]
> >> >
> >> > Thanks in advance.  Carol.
GVaught - 22 Sep 2004 02:04 GMT
Try this knowledge base article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;312851

Signature

G Vaught

> Why do I always end up with the esoteric problems?  ;-)
>
[quoted text clipped - 158 lines]
>> >> >
>> >> > Thanks in advance.  Carol.
CPutnam - 22 Sep 2004 14:10 GMT
Thanks but I don't think that was the problem.  Two reasons:  Once I
reinstalled Office XP, my application worked.  And the application's creator
was very good about his naming -- all the modules were called basxxxxx and
the functions had names like gfncFunction().

> Try this knowledge base article:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;312851
[quoted text clipped - 161 lines]
> >> >> >
> >> >> > Thanks in advance.  Carol.
CPutnam - 22 Sep 2004 01:48 GMT
GOOD NEWS -- I finally got this working but to do that I had to totally
uninstall Office XP and Office97 and then reinstall Office XP (and I'm not
going to touch Office97 until I'm sure that I can get this conversion all
worked out).

Thanks for your help, Allen.  Carol.

> Hi, all.  We have a database application created in Access 97 that we are
> trying to convert to Access 2002.  When I convert the file, it appears to go
[quoted text clipped - 25 lines]
>
> Thanks in advance.  Carol.
Allen Browne - 22 Sep 2004 03:59 GMT
Excellent!

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> GOOD NEWS -- I finally got this working but to do that I had to totally
> uninstall Office XP and Office97 and then reinstall Office XP (and I'm not
[quoted text clipped - 46 lines]
>>
>> Thanks in advance.  Carol.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.