Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

not enough memory

Status
Not open for further replies.

zrzr

Programmer
May 22, 2003
83
0
0
FR
I'm currently developping a database with access 2002 on windows XP.
It works well on my PC, and on any other windows XP PC.

Now I need to install the base on a windows 98 PC(196 Mo of RAM), using access 2002. When I run Access, I use an autoexec macro to run VBA code. In windows 98, I get an error when running code : 'not enough memory'
Then I OK, and I get a second error : 'unable to find project or command' or something like that, about the function Command().

First, do you think these two problems are linked ?
What can I do to fix them ?

 
Are you loading a lot of forms at the opening of the database and then hiding them? If so, that takes up memory. It's faster for users to have forms loaded and hidden, and then made visible when needed, but it's a memory hogger. Hope this helps.

Jim DeGeorge [wavey]
 
Thanks for replyind Jim !

No, I load forms one after the other, and when I quit a form, I close it instead of hidding it.

Moreover, the message appears at the beggining of the application, before opening the first form.

I've done some tests since my last post : When I use the function Command in the database I created in windows XP, I get an error saying that Acces doesn't know this function. But when I create a new database on windows 98,and then a module with the same function (Command) it works very well.

I'm totaly lost !!!
 
What exactly is the code you're using? It could be that the version of VB on the Windows 98 machine doesn't support the command you're using.

Jim DeGeorge [wavey]
 
This is the part of the code where I have a problem :

Public function connexion()
If Command<>&quot;&quot; then
...
...
end if
End if

* This function is called by an Autoexec macro, and it's the first thing the application do. I use it to set some thinks according to the params. The word Command is highlighted when I get the error.
* I use exactly the same version of Access (Access 2002, with Access 2000 file format) The only difference is that in windows XP I use office SP1, and not in 98.Do you think it can be the problem ?
* There is no problem if I use command function in any appliation creted on windows 98

At the moment, i'm downloading office SP1 to install it on windows 98. I'll post the result if you want.
 
I'm still not understanding &quot;COMMAND&quot;. I just checked Access XP and it's not listed in the help file. Is &quot;COMMAND&quot; a field on a form or something?

What's the missing code represented by &quot;...&quot;? Maybe there's another way to do what you're trying to do if the IF statement is TRUE.

Jim DeGeorge [wavey]
 
Public Sub connection()
If Command <> &quot;&quot; Then
DoCmd.Hourglass True
DoCmd.OpenForm &quot;Synchronisation&quot;
DoEvents
synchroniser Command, Importer
DoCmd.Close acForm, &quot;Synchronisation&quot;
DoCmd.Hourglass False
End If
End Sub

Command is a function of VBA.It is referenced in the library &quot;Visual Basic For Application&quot;. It returns the arguments used to open access. For example, this is th command line I use to open Access:

&quot;C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE&quot; &quot;U:\Guillaume\en cours\ABC.mdb&quot; /wrkgrp &quot;U:\Guillaume\en cours\ACML.mdw&quot; /cmd &quot;synchroniser&quot;

In this case, the command function will return &quot;synchroniser&quot;
 
Sorry, but this one is over my head. Hope you get an answer from someone. Good luck.

Jim DeGeorge [wavey]
 
that's right jim, thanks for trying ;o)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top