How to create a system.mdw by code ?

  • Thread starter Thread starter Javier via AccessMonster.com
  • Start date Start date
J

Javier via AccessMonster.com

Hi !
Can anybody help me how to create a system.mdw file by code DAO ??

Thank you !
Javier
 
This was not possible in Access 97 & before.

In Access 2000, 2002 or 2003 they added a method to do it
programatcially, but I can't for the life of me find it again! That new
method is probably only available in ADO, not DAO. Maybe someone else
can jump in here.

For another solution, do a search for TSIMDW. I gather that this worked
fine for Access versions up to 97 (using Jet 3), but I don't know if it
works for later versions (Jet 4).

Since the workgroup file is just an Access database "under the hood",
it's tempting to try & create the relevant tables & queries manually
(in a new database). No can do! Try it yourself, you'll soon see why.

HTH,
TC
 
In Access 2002 VBA Help, I found:
CreateNewWorkgroupFile Method

No idea what it does <g>

(That Help is sure messed up) <not-a-joke>
 
Thank you !

But i tryed like Access help says:

Application.CreateNewWorkgroupFile _
Path:="C:\Documents and Settings\Wendy Vasse" _
& "\Application Data\Microsoft\Access", _
Name:="Wendy Vasse", _
Company:="Microsoft", _
Replace:=True

But not success for me, ......... show ERROR sometimes,......
anothers nothing happend. (I espected a new system.mdw in my computer)
but,...............I think I'm doing something wrong and I do Not know what.
Of course i changed "Wendy Vasse" for a real user name, but.......

Can any body explain it how to creat a NEW system.mdw by code ???

regards
 
Javier, please don't say you got an error, but not say what the error
IS (ie. the message). There are countless hundreds of thousands of
possible errors. No-one has time to guess what you're getting. You need
to copy the message into your post. You've been a /bad boy/, please do
better next time! :-)

As for the problem:

I think that CreateNewWorkgroupFile is only in Access 2002 & 2003. Are
you using one of those versions?

Whatever, your call is missing one parameter. See:


http://msdn.microsoft.com/library/d.../vbaac10/html/acmthCreateNewWorkgroupFile.asp

HTH,
TC
 
Hi !

Some times I got this following errors:

PROBLEM
Error 2625 "Workgroup Administrator couldn'nt create the workgroup
information file. Make sure that you have specified a valid path and file
name, that you have adequate permissions to create the file and that you have
enought disk space on destination drive (-1032)"

ANSWER
I have more tha 100 Gbs free disk space !. I write a valit path destination,
I have Administration rights,..... So I do not understand this error.


PROBLEM
Error 2636 "WorkGroup file already exist"

ANSWER
I do not understand why this happens,....... the name file is new

PROBLEM
Error 2630 "Path Invalid"

ANSWER
Ok , this error is corrected now

The above ERRORS happens after press F5 in a general MODULE

Function fNewMDW()
Application.CreateNewWorkgroupFile _
Path:="C:\Documents and Settings\Wendy Vasse" _
& "\Application Data\Microsoft\Access", _
Name:="Wendy Vasse", _
Company:="Microsoft", _
Replace:=True

MsgBox "END"
End Function

Wendy Vasse = [ Changed to my USER"S NAME]

What I'm doing wrong ???

regards
 
Ok !!!!!!!!!!

Finally I found the solution:

Application.CreateNewWorkgroupFile CurrentProject.Path & "\MySecure.mdw"

But the Access Help code still not work

'Application.CreateNewWorkgroupFile _
' Path:="C:\Documents and Settings\Wendy Vasse" _
' & "\Application Data\Microsoft\Access", _
' Name:="Wendy Vasse", _
' Company:="Microsoft", _
' Replace:=True

Regards
 
You are missing the Workgroup Identifier (WID) parameter from your
code. Go back & check the reference that I gave you before.

Note that for proper security, you should /always/ provide a nonblank
Workgroup Identifier, even if Access lets you leave it blank. If you
leave it blank, anyone else with physical access to your PC can create
a workgroup file that lets them break in to all your secured databases.
If you always provide a WID, when you create a workgroup file, they
will not be able to do that.

HTH,
TC
 
thank you very much for answering !
Now is much clear.
regards
Javier
 
Back
Top