CreateDatabase / Access 2007

Hi all,

Question: Can Access 2007 be forced to create an Access 2000 database when
using CreateDatabase?

I have a "utility" database that I distribute in version 2000 to users which
is used to extract data from their main database (also version 2000) and
which then creates and dumps this data into a new database ("Homedata.mdb").
This new database can then be zipped up, emailed, and uploaded into our
central database.

The basic procedure is:
Data is extracted from the user's main database; placed in tables within the
"utility" database; "Homedata.mdb" is created; the tables from the "utility"
database are copied into "Homedata.mdb" using DoCmd.CopyObject; the user
zips-up and emails "Homedata.mdb".

The problem is that with users running Access 2007, even though their
"utility" database is version 2000 and version 2000 is set as the default
database format under Access Options, the new database that is created is in
version 2007. This means that I have to wait for someone with 2007 on their
laptop to process this "Homedata.mdb" that the user emailed.

The "utility" database uses the following code to create the new database:

Dim wrkDefault As Workspace
Dim dbsHomedata As Database
    ' Get default Workspace.
    Set wrkDefault = DBEngine.Workspaces(0)
    ' Make sure there isn't already a file with the name of
    ' the new database.
    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
:\Transfer\Homedata.mdb"
    ' Create a new database
    Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
dbLangGeneral)

Suggestions?
Thanks,
Mark


0
FPS
11/19/2009 2:16:05 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

11 Replies
980 Views

Similar Articles

[PageSpeed] 6

  Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb", _
    dbLangGeneral, dbVersion40)

(yeah, it's a little confusing that you need to use dbVersion40 to be 
compatible with DAO 3.6!)

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"FPS, Romney" <fpswv@citlink.net> wrote in message 
news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
> Hi all,
>
> Question: Can Access 2007 be forced to create an Access 2000 database when
> using CreateDatabase?
>
> I have a "utility" database that I distribute in version 2000 to users 
> which
> is used to extract data from their main database (also version 2000) and
> which then creates and dumps this data into a new database 
> ("Homedata.mdb").
> This new database can then be zipped up, emailed, and uploaded into our
> central database.
>
> The basic procedure is:
> Data is extracted from the user's main database; placed in tables within 
> the
> "utility" database; "Homedata.mdb" is created; the tables from the 
> "utility"
> database are copied into "Homedata.mdb" using DoCmd.CopyObject; the user
> zips-up and emails "Homedata.mdb".
>
> The problem is that with users running Access 2007, even though their
> "utility" database is version 2000 and version 2000 is set as the default
> database format under Access Options, the new database that is created is 
> in
> version 2007. This means that I have to wait for someone with 2007 on 
> their
> laptop to process this "Homedata.mdb" that the user emailed.
>
> The "utility" database uses the following code to create the new database:
>
> Dim wrkDefault As Workspace
> Dim dbsHomedata As Database
>    ' Get default Workspace.
>    Set wrkDefault = DBEngine.Workspaces(0)
>    ' Make sure there isn't already a file with the name of
>    ' the new database.
>    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
> :\Transfer\Homedata.mdb"
>    ' Create a new database
>    Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> dbLangGeneral)
>
> Suggestions?
> Thanks,
> Mark
>
> 


0
Douglas
11/19/2009 2:15:53 PM
Yes, although the documentation says dbVersion30 uses database engine 
version 3.0 file format (which was Access 95).

http://msdn.microsoft.com/en-us/library/bb243161.aspx

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"FPS, Romney" <fpswv@citlink.net> wrote in message 
news:uTujdSSaKHA.5608@TK2MSFTNGP05.phx.gbl...
> Thank you, Douglas
> Since I do design work using Access '97, would dbVersion30 work just as
> well?
> Mark
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
> news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl...
>>   Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> _
>>     dbLangGeneral, dbVersion40)
>>
>> (yeah, it's a little confusing that you need to use dbVersion40 to be
>> compatible with DAO 3.6!)
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "FPS, Romney" <fpswv@citlink.net> wrote in message
>> news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
>> > Hi all,
>> >
>> > Question: Can Access 2007 be forced to create an Access 2000 database
> when
>> > using CreateDatabase?
>> >
>> > I have a "utility" database that I distribute in version 2000 to users
>> > which
>> > is used to extract data from their main database (also version 2000) 
>> > and
>> > which then creates and dumps this data into a new database
>> > ("Homedata.mdb").
>> > This new database can then be zipped up, emailed, and uploaded into our
>> > central database.
>> >
>> > The basic procedure is:
>> > Data is extracted from the user's main database; placed in tables 
>> > within
>> > the
>> > "utility" database; "Homedata.mdb" is created; the tables from the
>> > "utility"
>> > database are copied into "Homedata.mdb" using DoCmd.CopyObject; the 
>> > user
>> > zips-up and emails "Homedata.mdb".
>> >
>> > The problem is that with users running Access 2007, even though their
>> > "utility" database is version 2000 and version 2000 is set as the
> default
>> > database format under Access Options, the new database that is created
> is
>> > in
>> > version 2007. This means that I have to wait for someone with 2007 on
>> > their
>> > laptop to process this "Homedata.mdb" that the user emailed.
>> >
>> > The "utility" database uses the following code to create the new
> database:
>> >
>> > Dim wrkDefault As Workspace
>> > Dim dbsHomedata As Database
>> >    ' Get default Workspace.
>> >    Set wrkDefault = DBEngine.Workspaces(0)
>> >    ' Make sure there isn't already a file with the name of
>> >    ' the new database.
>> >    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
>> > :\Transfer\Homedata.mdb"
>> >    ' Create a new database
>> >    Set dbsHomedata =
> wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
>> > dbLangGeneral)
>> >
>> > Suggestions?
>> > Thanks,
>> > Mark
>> >
>> >
>>
>>
>
> 


0
Douglas
11/19/2009 2:32:43 PM
by specifying dbVersion30 in the options part of CreateDatabase?

"FPS, Romney" <fpswv@citlink.net> wrote in message
news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
> Hi all,
>
> Question: Can Access 2007 be forced to create an Access 2000 database when
> using CreateDatabase?
>
> I have a "utility" database that I distribute in version 2000 to users
which
> is used to extract data from their main database (also version 2000) and
> which then creates and dumps this data into a new database
("Homedata.mdb").
> This new database can then be zipped up, emailed, and uploaded into our
> central database.
>
> The basic procedure is:
> Data is extracted from the user's main database; placed in tables within
the
> "utility" database; "Homedata.mdb" is created; the tables from the
"utility"
> database are copied into "Homedata.mdb" using DoCmd.CopyObject; the user
> zips-up and emails "Homedata.mdb".
>
> The problem is that with users running Access 2007, even though their
> "utility" database is version 2000 and version 2000 is set as the default
> database format under Access Options, the new database that is created is
in
> version 2007. This means that I have to wait for someone with 2007 on
their
> laptop to process this "Homedata.mdb" that the user emailed.
>
> The "utility" database uses the following code to create the new database:
>
> Dim wrkDefault As Workspace
> Dim dbsHomedata As Database
>     ' Get default Workspace.
>     Set wrkDefault = DBEngine.Workspaces(0)
>     ' Make sure there isn't already a file with the name of
>     ' the new database.
>     If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
> :\Transfer\Homedata.mdb"
>     ' Create a new database
>     Set dbsHomedata =
wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> dbLangGeneral)
>
> Suggestions?
> Thanks,
> Mark
>
>


0
FPS
11/19/2009 3:15:56 PM
Thank you, Douglas
Since I do design work using Access '97, would dbVersion30 work just as
well?
Mark

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl...
>   Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
_
>     dbLangGeneral, dbVersion40)
>
> (yeah, it's a little confusing that you need to use dbVersion40 to be
> compatible with DAO 3.6!)
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "FPS, Romney" <fpswv@citlink.net> wrote in message
> news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
> > Hi all,
> >
> > Question: Can Access 2007 be forced to create an Access 2000 database
when
> > using CreateDatabase?
> >
> > I have a "utility" database that I distribute in version 2000 to users
> > which
> > is used to extract data from their main database (also version 2000) and
> > which then creates and dumps this data into a new database
> > ("Homedata.mdb").
> > This new database can then be zipped up, emailed, and uploaded into our
> > central database.
> >
> > The basic procedure is:
> > Data is extracted from the user's main database; placed in tables within
> > the
> > "utility" database; "Homedata.mdb" is created; the tables from the
> > "utility"
> > database are copied into "Homedata.mdb" using DoCmd.CopyObject; the user
> > zips-up and emails "Homedata.mdb".
> >
> > The problem is that with users running Access 2007, even though their
> > "utility" database is version 2000 and version 2000 is set as the
default
> > database format under Access Options, the new database that is created
is
> > in
> > version 2007. This means that I have to wait for someone with 2007 on
> > their
> > laptop to process this "Homedata.mdb" that the user emailed.
> >
> > The "utility" database uses the following code to create the new
database:
> >
> > Dim wrkDefault As Workspace
> > Dim dbsHomedata As Database
> >    ' Get default Workspace.
> >    Set wrkDefault = DBEngine.Workspaces(0)
> >    ' Make sure there isn't already a file with the name of
> >    ' the new database.
> >    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
> > :\Transfer\Homedata.mdb"
> >    ' Create a new database
> >    Set dbsHomedata =
wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> > dbLangGeneral)
> >
> > Suggestions?
> > Thanks,
> > Mark
> >
> >
>
>


0
FPS
11/19/2009 3:30:51 PM
This is exactly the topic I was looking for.  The Access Help in 2007 goes 
from dbVersion40 to dbVersion120.  Based on this thread, it sounds like 
dbVersion40 is Access 2000.  If I want to force CreateDatabase to make Access 
2002-2003, what dbVersion do I need to use?
-- 
-DinosRose - sometimes I think I've gotten in over my head...


"Douglas J. Steele" wrote:

> Yes, although the documentation says dbVersion30 uses database engine 
> version 3.0 file format (which was Access 95).
> 
> http://msdn.microsoft.com/en-us/library/bb243161.aspx
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "FPS, Romney" <fpswv@citlink.net> wrote in message 
> news:uTujdSSaKHA.5608@TK2MSFTNGP05.phx.gbl...
> > Thank you, Douglas
> > Since I do design work using Access '97, would dbVersion30 work just as
> > well?
> > Mark
> >
> > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
> > news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl...
> >>   Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> > _
> >>     dbLangGeneral, dbVersion40)
> >>
> >> (yeah, it's a little confusing that you need to use dbVersion40 to be
> >> compatible with DAO 3.6!)
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "FPS, Romney" <fpswv@citlink.net> wrote in message
> >> news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
> >> > Hi all,
> >> >
> >> > Question: Can Access 2007 be forced to create an Access 2000 database
> > when
> >> > using CreateDatabase?
> >> >
> >> > I have a "utility" database that I distribute in version 2000 to users
> >> > which
> >> > is used to extract data from their main database (also version 2000) 
> >> > and
> >> > which then creates and dumps this data into a new database
> >> > ("Homedata.mdb").
> >> > This new database can then be zipped up, emailed, and uploaded into our
> >> > central database.
> >> >
> >> > The basic procedure is:
> >> > Data is extracted from the user's main database; placed in tables 
> >> > within
> >> > the
> >> > "utility" database; "Homedata.mdb" is created; the tables from the
> >> > "utility"
> >> > database are copied into "Homedata.mdb" using DoCmd.CopyObject; the 
> >> > user
> >> > zips-up and emails "Homedata.mdb".
> >> >
> >> > The problem is that with users running Access 2007, even though their
> >> > "utility" database is version 2000 and version 2000 is set as the
> > default
> >> > database format under Access Options, the new database that is created
> > is
> >> > in
> >> > version 2007. This means that I have to wait for someone with 2007 on
> >> > their
> >> > laptop to process this "Homedata.mdb" that the user emailed.
> >> >
> >> > The "utility" database uses the following code to create the new
> > database:
> >> >
> >> > Dim wrkDefault As Workspace
> >> > Dim dbsHomedata As Database
> >> >    ' Get default Workspace.
> >> >    Set wrkDefault = DBEngine.Workspaces(0)
> >> >    ' Make sure there isn't already a file with the name of
> >> >    ' the new database.
> >> >    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
> >> > :\Transfer\Homedata.mdb"
> >> >    ' Create a new database
> >> >    Set dbsHomedata =
> > wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> >> > dbLangGeneral)
> >> >
> >> > Suggestions?
> >> > Thanks,
> >> > Mark
> >> >
> >> >
> >>
> >>
> >
> > 
> 
> 
> .
> 
0
Utf
11/19/2009 10:36:01 PM
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in
news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl: 

>   Set dbsHomedata =
>   wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb", _ 
>     dbLangGeneral, dbVersion40)
> 
> (yeah, it's a little confusing that you need to use dbVersion40 to
> be compatible with DAO 3.6!)

Why would that be confusing? DAO 3.6 is the version of DAO that goes
with Jet 4.0. DAO != Jet -- they have independent version numbers. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
David
11/20/2009 3:32:39 AM
=?Utf-8?B?RGlub3NSb3Nl?= <DinosRose@discussions.microsoft.com> wrote
in news:A817760D-46D2-4CE5-8DAA-EB13017FB022@microsoft.com: 

> The Access Help in 2007 goes 
> from dbVersion40 to dbVersion120.  Based on this thread, it sounds
> like dbVersion40 is Access 2000.  If I want to force
> CreateDatabase to make Access 2002-2003, what dbVersion do I need
> to use? 

The dbVersionXX constants are not *Access* versions, but *Jet*
versions. dbVersion40 is Jet 4.0. dbVersion30 is Jet 3.0. I'd expect
there to be a dbVersion35 for Jet 3.5 (the version that shipped with
Access 97). 

The Jet version for Access 2000, 2002 and 2003 remained the same,
i.e,. Jet 4.0. Now, there are version-specific formats for each of
those versions of Access, but the differences between A2000, A2002
and A2003 databases are *not* in Jet, but in the Access project
(i.e., VBA). So, for CreateDatabase, you would use dbVersion40 for
all three. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
David
11/20/2009 3:35:57 AM
Doug,

I opened the 97 version of the Utility database and added "vbVersion30" as
an option for CreateDatabase.
'-----------------
Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
dbLangGeneral, dbVersion30)
'-----------------
I converted the Utility database to Access version 2000 and successfully
used it under Access 2007 to create "Homedata.mdb", which could then be
opened under either Access 97 or Access 2002/2003. -- great!

So far, so good.

However, the 97 version of the Utility database no longer works for creating
this "Homedata.mdb" file, producing the dreaded: "This program has performed
an illegal operation and will shut down ...".  Removing that option results
in the 97 version working fine just as it always has.

"Compile and Save All Modules" never grays out with this option present.
This is Access 97, SR2, Jet35sp3
References:
Visual Basic for Applications
Microsoft Access 8.0 Object Library
Microsoft DAO 3.5 Object Library

Any ideas?

Thanks,
Mark


"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl...
>   Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
_
>     dbLangGeneral, dbVersion40)
>
> (yeah, it's a little confusing that you need to use dbVersion40 to be
> compatible with DAO 3.6!)
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "FPS, Romney" <fpswv@citlink.net> wrote in message
> news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
> > Hi all,
> >
> > Question: Can Access 2007 be forced to create an Access 2000 database
when
> > using CreateDatabase?
> >
> > I have a "utility" database that I distribute in version 2000 to users
> > which
> > is used to extract data from their main database (also version 2000) and
> > which then creates and dumps this data into a new database
> > ("Homedata.mdb").
> > This new database can then be zipped up, emailed, and uploaded into our
> > central database.
> >
> > The basic procedure is:
> > Data is extracted from the user's main database; placed in tables within
> > the
> > "utility" database; "Homedata.mdb" is created; the tables from the
> > "utility"
> > database are copied into "Homedata.mdb" using DoCmd.CopyObject; the user
> > zips-up and emails "Homedata.mdb".
> >
> > The problem is that with users running Access 2007, even though their
> > "utility" database is version 2000 and version 2000 is set as the
default
> > database format under Access Options, the new database that is created
is
> > in
> > version 2007. This means that I have to wait for someone with 2007 on
> > their
> > laptop to process this "Homedata.mdb" that the user emailed.
> >
> > The "utility" database uses the following code to create the new
database:
> >
> > Dim wrkDefault As Workspace
> > Dim dbsHomedata As Database
> >    ' Get default Workspace.
> >    Set wrkDefault = DBEngine.Workspaces(0)
> >    ' Make sure there isn't already a file with the name of
> >    ' the new database.
> >    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
> > :\Transfer\Homedata.mdb"
> >    ' Create a new database
> >    Set dbsHomedata =
wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> > dbLangGeneral)
> >
> > Suggestions?
> > Thanks,
> > Mark
> >
> >
>
>


0
FPS
11/23/2009 9:57:54 PM
I'm not sure I follow what you're doing, but I don't see why you'd bother 
specifying dbVersion30 in the Access 97 version.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"FPS, Romney" <fpswv@citlink.net> wrote in message 
news:eNd%23X9HbKHA.1648@TK2MSFTNGP05.phx.gbl...
> Doug,
>
> I opened the 97 version of the Utility database and added "vbVersion30" as
> an option for CreateDatabase.
> '-----------------
> Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> dbLangGeneral, dbVersion30)
> '-----------------
> I converted the Utility database to Access version 2000 and successfully
> used it under Access 2007 to create "Homedata.mdb", which could then be
> opened under either Access 97 or Access 2002/2003. -- great!
>
> So far, so good.
>
> However, the 97 version of the Utility database no longer works for 
> creating
> this "Homedata.mdb" file, producing the dreaded: "This program has 
> performed
> an illegal operation and will shut down ...".  Removing that option 
> results
> in the 97 version working fine just as it always has.
>
> "Compile and Save All Modules" never grays out with this option present.
> This is Access 97, SR2, Jet35sp3
> References:
> Visual Basic for Applications
> Microsoft Access 8.0 Object Library
> Microsoft DAO 3.5 Object Library
>
> Any ideas?
>
> Thanks,
> Mark
>
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
> news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl...
>>   Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> _
>>     dbLangGeneral, dbVersion40)
>>
>> (yeah, it's a little confusing that you need to use dbVersion40 to be
>> compatible with DAO 3.6!)
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "FPS, Romney" <fpswv@citlink.net> wrote in message
>> news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
>> > Hi all,
>> >
>> > Question: Can Access 2007 be forced to create an Access 2000 database
> when
>> > using CreateDatabase?
>> >
>> > I have a "utility" database that I distribute in version 2000 to users
>> > which
>> > is used to extract data from their main database (also version 2000) 
>> > and
>> > which then creates and dumps this data into a new database
>> > ("Homedata.mdb").
>> > This new database can then be zipped up, emailed, and uploaded into our
>> > central database.
>> >
>> > The basic procedure is:
>> > Data is extracted from the user's main database; placed in tables 
>> > within
>> > the
>> > "utility" database; "Homedata.mdb" is created; the tables from the
>> > "utility"
>> > database are copied into "Homedata.mdb" using DoCmd.CopyObject; the 
>> > user
>> > zips-up and emails "Homedata.mdb".
>> >
>> > The problem is that with users running Access 2007, even though their
>> > "utility" database is version 2000 and version 2000 is set as the
> default
>> > database format under Access Options, the new database that is created
> is
>> > in
>> > version 2007. This means that I have to wait for someone with 2007 on
>> > their
>> > laptop to process this "Homedata.mdb" that the user emailed.
>> >
>> > The "utility" database uses the following code to create the new
> database:
>> >
>> > Dim wrkDefault As Workspace
>> > Dim dbsHomedata As Database
>> >    ' Get default Workspace.
>> >    Set wrkDefault = DBEngine.Workspaces(0)
>> >    ' Make sure there isn't already a file with the name of
>> >    ' the new database.
>> >    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
>> > :\Transfer\Homedata.mdb"
>> >    ' Create a new database
>> >    Set dbsHomedata =
> wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
>> > dbLangGeneral)
>> >
>> > Suggestions?
>> > Thanks,
>> > Mark
>> >
>> >
>>
>>
>
> 


0
Douglas
11/23/2009 10:53:30 PM
Doug,
You're correct, the option is not necessary in the 97 version. However, I
develop in Access 97 and then convert this to 2000, which is then
distributed to 2002/2003 and 2007 users. It's just more convenient if the
code is compatable across both 97 and 2000. That way, I can add it in at the
time of development (Access97), convert it to 2000 and distribute it -- 
without then also having to add additional code to prevent 2007 users from
creating a Homedata.mdb file which can't be processed by any of our office
computers.

2002/2003 users also created a Homedata.mdb which couldn't be opened under
97, but that wasn't a problem -- we've got plenty of computers in the office
running Access 2002/2003 which can be used to process this Homedata.mdb file
emailed in by users -- just no Access 2007 computers.

Adding the option "vbVersion30" to CreateDatabase does work to prevent 2007
from creating a 2007 version of Homedata.mdb. However, adding this option in
the 97 development database crashes the system -- even though "vbVersion30"
is listed in the 97 Help files as a viable option under CreateDatabase.

Mark


"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
news:O4nQH$IbKHA.6028@TK2MSFTNGP04.phx.gbl...
> I'm not sure I follow what you're doing, but I don't see why you'd bother
> specifying dbVersion30 in the Access 97 version.
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "FPS, Romney" <fpswv@citlink.net> wrote in message
> news:eNd%23X9HbKHA.1648@TK2MSFTNGP05.phx.gbl...
> > Doug,
> >
> > I opened the 97 version of the Utility database and added "vbVersion30"
as
> > an option for CreateDatabase.
> > '-----------------
> > Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> > dbLangGeneral, dbVersion30)
> > '-----------------
> > I converted the Utility database to Access version 2000 and successfully
> > used it under Access 2007 to create "Homedata.mdb", which could then be
> > opened under either Access 97 or Access 2002/2003. -- great!
> >
> > So far, so good.
> >
> > However, the 97 version of the Utility database no longer works for
> > creating
> > this "Homedata.mdb" file, producing the dreaded: "This program has
> > performed
> > an illegal operation and will shut down ...".  Removing that option
> > results
> > in the 97 version working fine just as it always has.
> >
> > "Compile and Save All Modules" never grays out with this option present.
> > This is Access 97, SR2, Jet35sp3
> > References:
> > Visual Basic for Applications
> > Microsoft Access 8.0 Object Library
> > Microsoft DAO 3.5 Object Library
> >
> > Any ideas?
> >
> > Thanks,
> > Mark
> >
> >
> > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
> > news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl...
> >>   Set dbsHomedata =
wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> > _
> >>     dbLangGeneral, dbVersion40)
> >>
> >> (yeah, it's a little confusing that you need to use dbVersion40 to be
> >> compatible with DAO 3.6!)
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "FPS, Romney" <fpswv@citlink.net> wrote in message
> >> news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
> >> > Hi all,
> >> >
> >> > Question: Can Access 2007 be forced to create an Access 2000 database
> > when
> >> > using CreateDatabase?
> >> >
> >> > I have a "utility" database that I distribute in version 2000 to
users
> >> > which
> >> > is used to extract data from their main database (also version 2000)
> >> > and
> >> > which then creates and dumps this data into a new database
> >> > ("Homedata.mdb").
> >> > This new database can then be zipped up, emailed, and uploaded into
our
> >> > central database.
> >> >
> >> > The basic procedure is:
> >> > Data is extracted from the user's main database; placed in tables
> >> > within
> >> > the
> >> > "utility" database; "Homedata.mdb" is created; the tables from the
> >> > "utility"
> >> > database are copied into "Homedata.mdb" using DoCmd.CopyObject; the
> >> > user
> >> > zips-up and emails "Homedata.mdb".
> >> >
> >> > The problem is that with users running Access 2007, even though their
> >> > "utility" database is version 2000 and version 2000 is set as the
> > default
> >> > database format under Access Options, the new database that is
created
> > is
> >> > in
> >> > version 2007. This means that I have to wait for someone with 2007 on
> >> > their
> >> > laptop to process this "Homedata.mdb" that the user emailed.
> >> >
> >> > The "utility" database uses the following code to create the new
> > database:
> >> >
> >> > Dim wrkDefault As Workspace
> >> > Dim dbsHomedata As Database
> >> >    ' Get default Workspace.
> >> >    Set wrkDefault = DBEngine.Workspaces(0)
> >> >    ' Make sure there isn't already a file with the name of
> >> >    ' the new database.
> >> >    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
> >> > :\Transfer\Homedata.mdb"
> >> >    ' Create a new database
> >> >    Set dbsHomedata =
> > wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> >> > dbLangGeneral)
> >> >
> >> > Suggestions?
> >> > Thanks,
> >> > Mark
> >> >
> >> >
> >>
> >>
> >
> >
>
>


0
Mark
11/24/2009 10:06:50 AM
I've got it. Thanks, Doug
.... adding the "dbVersion30" option does work in both the 97 version as well
as the (converted) 2000 version -- which is where it's needed later for 2007
users.

Initially, adding the dbVersion30 option and then clicking "Compile and Save
All Modules" was triggering "This program has performed an illegal operation
and will shut down ...".  The problem was actually associated with another
module, but didn't generate the "illegal operation/shut down" problem until
after I added the dbVersion30 option in this current module.

Thank you for your help.
Mark

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
news:O4nQH$IbKHA.6028@TK2MSFTNGP04.phx.gbl...
> I'm not sure I follow what you're doing, but I don't see why you'd bother
> specifying dbVersion30 in the Access 97 version.
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "FPS, Romney" <fpswv@citlink.net> wrote in message
> news:eNd%23X9HbKHA.1648@TK2MSFTNGP05.phx.gbl...
> > Doug,
> >
> > I opened the 97 version of the Utility database and added "vbVersion30"
as
> > an option for CreateDatabase.
> > '-----------------
> > Set dbsHomedata = wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> > dbLangGeneral, dbVersion30)
> > '-----------------
> > I converted the Utility database to Access version 2000 and successfully
> > used it under Access 2007 to create "Homedata.mdb", which could then be
> > opened under either Access 97 or Access 2002/2003. -- great!
> >
> > So far, so good.
> >
> > However, the 97 version of the Utility database no longer works for
> > creating
> > this "Homedata.mdb" file, producing the dreaded: "This program has
> > performed
> > an illegal operation and will shut down ...".  Removing that option
> > results
> > in the 97 version working fine just as it always has.
> >
> > "Compile and Save All Modules" never grays out with this option present.
> > This is Access 97, SR2, Jet35sp3
> > References:
> > Visual Basic for Applications
> > Microsoft Access 8.0 Object Library
> > Microsoft DAO 3.5 Object Library
> >
> > Any ideas?
> >
> > Thanks,
> > Mark
> >
> >
> > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
> > news:eZcrPLSaKHA.4312@TK2MSFTNGP04.phx.gbl...
> >>   Set dbsHomedata =
wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> > _
> >>     dbLangGeneral, dbVersion40)
> >>
> >> (yeah, it's a little confusing that you need to use dbVersion40 to be
> >> compatible with DAO 3.6!)
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "FPS, Romney" <fpswv@citlink.net> wrote in message
> >> news:O78hroRaKHA.4668@TK2MSFTNGP06.phx.gbl...
> >> > Hi all,
> >> >
> >> > Question: Can Access 2007 be forced to create an Access 2000 database
> > when
> >> > using CreateDatabase?
> >> >
> >> > I have a "utility" database that I distribute in version 2000 to
users
> >> > which
> >> > is used to extract data from their main database (also version 2000)
> >> > and
> >> > which then creates and dumps this data into a new database
> >> > ("Homedata.mdb").
> >> > This new database can then be zipped up, emailed, and uploaded into
our
> >> > central database.
> >> >
> >> > The basic procedure is:
> >> > Data is extracted from the user's main database; placed in tables
> >> > within
> >> > the
> >> > "utility" database; "Homedata.mdb" is created; the tables from the
> >> > "utility"
> >> > database are copied into "Homedata.mdb" using DoCmd.CopyObject; the
> >> > user
> >> > zips-up and emails "Homedata.mdb".
> >> >
> >> > The problem is that with users running Access 2007, even though their
> >> > "utility" database is version 2000 and version 2000 is set as the
> > default
> >> > database format under Access Options, the new database that is
created
> > is
> >> > in
> >> > version 2007. This means that I have to wait for someone with 2007 on
> >> > their
> >> > laptop to process this "Homedata.mdb" that the user emailed.
> >> >
> >> > The "utility" database uses the following code to create the new
> > database:
> >> >
> >> > Dim wrkDefault As Workspace
> >> > Dim dbsHomedata As Database
> >> >    ' Get default Workspace.
> >> >    Set wrkDefault = DBEngine.Workspaces(0)
> >> >    ' Make sure there isn't already a file with the name of
> >> >    ' the new database.
> >> >    If Dir("c:\Transfer\Homedata.mdb") <> "" Then Kill
> >> > :\Transfer\Homedata.mdb"
> >> >    ' Create a new database
> >> >    Set dbsHomedata =
> > wrkDefault.CreateDatabase("C:\Transfer\Homedata.mdb",
> >> > dbLangGeneral)
> >> >
> >> > Suggestions?
> >> > Thanks,
> >> > Mark
> >> >
> >> >
> >>
> >>
> >
> >
>
>


0
FPS
11/24/2009 1:21:37 PM
Reply:

Similar Artilces:

Outlook 2007 Can't receive email messages
I am not able to receive emails through my pop3 account, I can only send. I keep getting the enter your password pop up window. Please help, thank you. Julio wrote: > I am not able to receive emails through my pop3 account, I can only send. I > keep getting the enter your password pop up window. Please help, thank you. Have you tried using the same login credentials recorded or used in Outlook when using the webmail interface to your e-mail account? Using the webmail client will let you know if the login credentials are correct and haven't been changed. If the logi...

ACCESS on a new iBook?
Hi, Has anyone any experience on running Access under Virtual PC or similar? I have a new model iBook 1.42 Ghz, 512MB RAM (soon to be upped to 1 GB) and 10.4.6. I'm wanting it to brush up my knowledge for use at work so won't be using huge data sets, just playing with new builds & small amounts of test data. I don't really want to buy an old PC just for this so just wanted to check it wouldn't be unusably slow under virtualisation software. Any advice greatly appreciated. Cheers Jason ____ Hi Jason, Microsoft Access works fine in Virtual PC. Yes, it's slightly...

Error message with Outlook 2007
I am running into problems with some of my users with previews. The error message I am getting is This file cannot be previewed because of an error with the previewer. To open the file double-click it. I found out the problem. Uninstall google desktop.. Just as an FYI "Joe" <josephadeluca@gmail.com> wrote in message news:40EFABD0-33C0-449A-A48E-75CD67B8C648@microsoft.com... > I am running into problems with some of my users with previews. The error > message I am getting is > This file cannot be previewed because of an error with the previewer. To > ope...

Is Version Updated after sp-1 is updated on Money 2007
After you get the automatic software downloaded is it necessary to click onto the sp-1 to install? -- Deb No it is automatic. If I recall, after the SP1 is downloaded, you are prompted to close Money and restart it. After you restart Help > About should give you a version number ending in .1024. -- Regards Bob Peel, Microsoft MVP - Money For UK tips & fixes see http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny. I do not respond to any emails that I have not specifically asked for. "Rebelleheart" <Rebelleheart@discussions.microsoft.com> wrote in messa...

my e-mail dose not work in office 2007
i am trying to e-mail from office 2007 i have to icon but when i click on it nothing happens do i have to activate it "glo" <glo@discussions.microsoft.com> wrote in message news:8D3ED581-F3ED-4C6A-9048-893EC1F57761@microsoft.com... >i am trying to e-mail from office 2007 i have to icon but when i click on >it > nothing happens do i have to activate it And your email client is? -- Asking a question? Please tell us the version of the application you are asking about, your OS, Service Pack level and the FULL contents of any error message(s) See if your mail p...

Client Access Licenses Explanation
Can someone here please point me in a good direction to getting a full understanding of Client Access Licenses. I would like to know what they refer to, and how they are applied to server products such as Windows Server 2003, that comes with 5 CALs. I am a little confused here, but in my own thinking; I am to assume that 5 CALs mean that only file (other) systems can connect to my server at any given time, to be within license. Then again; this is why I am asking cause I may be wrong. On Mon, 8 May 2006 10:54:54 -0400, "New Guy" <backup@yahoo.com> wrote: >Can som...

VPN and Public folders access
Hi all I have 3 exchange servers that are all in the same admin and routing group, two out of hte three servers are exchagne 2003 and hte third is a 5.5 server. All serves are in different parts of the country and they are all connected by high speed links. The problem that i have been noticing lately is when a user VPN's into the network (outlook 2003) the users outlook is trying to connect the public folders to an exchagne server that is not local to there network, when this happens a dialog box pops up asking the user for there username password, this mail server is in another ...

How to "transfer" or "copy" an SSL certificate from Exchange 2000 to Exchgange 2007
Sorry for my ignorance. I seem to have a brain deficiency when it comes to Certs. I am replacing an Exchange 2000 server with Exchange 2007 SP2 on Win2008. I have a .pxf that I had exported from the Ex2000 server, and I simply "imported" it into the Ex2007 using the import function on the IIS ssl certificates console on the exchange 2007 server....It now resides in that console and is also in the MMC Certificates (personal) folder and is enabled for server and client authorization. The question is: Am I done... or is there more to do in order to have things like OWA and Ac...

accessing ActiveX control enums in MFC
I have an ActiveX contol whose tlb (using OLE/COM viewer) shows // There are a couple of more of these, but this is typical example typedef enum { RF_MCS86 = 1, RF_BINARY = 2, RF_ASCII_BINARY = 3 } EROMFormat; This enum is accessed from another function from within the control as STDMETHOD Func(SAFEARRAY **Ptr, EROMFormat Fmt, Long * Retval) I have dropped the control onto my form and MFC has generated the wrappers for the methods except for the ones having SAFEARRAY arguments Now, not only does MFC not generate the function because of the familiar // method &...

Updating Money Deluxe 2007 question
Will Microsoft keep the Money updates available permanently, as they do with updates for old operating systems like Windows 98? The reason I ask is that, at least in my experience, Money updates have never been a manually downloadable file, but rather once you install the program, Money calls out on the Internet and looks for updates. If Microsoft doesn't keep the updates online, is there any way to download the update files now for permanent keeping? I did a test. I installed Money 2007 Deluxe on my Virtual PC. As soon as I went into the program after installation, it updated ...

PST file will not allow me access
I have a pst file from Office 2000 that I copied to cd. AS I tried to add it to my new computer and office 2003 I get the message that I do not have rights to access this file. How can I reset the permissions? There is not any password on it that I set by choice. Thanks Sal ...

Reconcile to GL access
Can anyone tell me how to grant a user access to the reconcile to gl routine? I've marked "reconcile purchasing", but this isn't it. I can't find a "reconcile to gl"option to mark under financial or purchasing. Thank You. Tracey Hi Tracey, The "Reconcile to GL" window is under the access list of: Product: Microsoft Dynamics GP Type: Windows Series: Financial In GP 10, you need to accomplish this by providing access to the Security Tasks Setup window while in GP 9 and below this under User Security. Hope this helps! Chee...

How do I repeat my header on each page of an access form
!@#$%^&*?! I am frustrated. I want to repeat a header on each form. Help states that there is a repeat property that needs to be set to yes. I can't find it anywhere! I've double clicked, right clicked on every section and box and cannot find this property setting. Help!!! Evon wrote: > !@#$%^&*?! I am frustrated. I want to repeat a header on each form. Help > states that there is a repeat property that needs to be set to yes. I > can't > find it anywhere! I've double clicked, right clicked on every section and > box and cannot fin...

Removing Anonymous Access on Backend Exchange Servers
Hi, We are running Backend & Front End Exchange Servers, Front End the anonymous access has been disabled. I am in the process of removing anonymous access in Backend also, but the problem is there are many applications which are using backend servers to send mails, most of it can be configured to authenticate before sending mails, but there are a quite a few legacy applications which cannot authenticate before sending mails (The code is not opensource & cannot be modified). I tried to allow relaying based on IP's, but still those legacy machines are not able to send mail...

Access 03-17-08
From a menu designed using access a query was run and the response we received says the records are deleted. The query's function is to search a table which has 6,000 records. The table with the records can be seen. However We cannot cannot do sorts or run queries on it. How do we free up the data access says is deleted.? It also says unrecognized data format when we try to look at the individual from related the the query on the menu. At times like this, nothing beats a good backup. In fact make a complete backup of your database now and put it away for safe keeping. AFTER makin...

Outlook Web Access loin page (ASP)
Hello, Can someone give some information about creating a personalised logon page to microsoft exchange 2003 through OWA. I have searched the Internet and found information about it but no howto or something like that. Thx for the help !!! This should help: http://support.microsoft.com/default.aspx?scid=kb;en-us;830827 "Strontje" <Strontje@pandora.be> wrote in message news:Gz6md.6$C%6.5708959@hebe.telenet-ops.be... > Hello, > > Can someone give some information about creating a personalised logon page > to microsoft exchange 2003 through OWA. > I have ...

ReInstallation of Outlook Client off line version on Vista Office 2007 Version 3.0vc
Has anybody successfully managed to achieve this as i need to add a new user to a vista machine which already has a CRM offline user attached. http://www.microsoft.com/dynamics/crm/using/deploy/removeclient.mspx Following the above link i know works fine for XP and 2003, but as things have changed in 2007 the above i am sure would not work with the new SQL Database that is installed with Vista and Outlook 2007. Any ideas. ...

format of excel file to be counted as Table for Access
While importing external data, there is an option of importing an excel file in the form of a Table. Though a table in Access also has headings & data below it, what does the utility expect an excel file to contain? Thanks ...

Merging queries by column in access
Hi, I have a series of queries which get data aggregated by year, e.g. select year(date), min(var1), avg(var1), max(var1) from table where (ridiculously complicated set of conditions) group by year(date) select year(date), min(var2), avg(var2), max(var2) from table where (entirely different ridiculously complicated set of conditions) group by year(date) etc etc There are six queries like this so what I want is to amalgamate these columns together into one results table (and also into one query so users can just run one stored query rather than six!) as follows: year, m...

threads accessing private methods
Hi! Here is a simple example on a timer accessing the private method timer_Elapsed. This works fine. In this example one might consider that the timer_Elapsed must be public because the one that is calling is not within the class. So I just wonder is it always in such a way that when the framework or the OS is calling upon a method it can be declared as private and it will work ? class Test { static void Main() { Timer timer = new Timer(); timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Interval = 1000; timer.Enabl...

Access autonumber field changes to date format when Excel imports
When importing Access data into Excel, the autonumber field in Access is chenged to date format instead of a general number format. I could run a macro to change the number format but this only happens on some Vista machines, not all. Any suggestions as to why this is happening? ...

Access denied to event invitation
People I invite to a calendar event get an access denied error when the try to accept -- jquinter ----------------------------------------------------------------------- jquintero's Profile: http://www.msusenet.com/member.php?userid=214 View this thread: http://www.msusenet.com/t-187052813 ...

PowerPoint 2007 won't open
I just installed Office 2007 personal edition. Word, Excel and Notes work, but PowerPoint will not open. I tried double-clicking on the exe file in Explorer and clicking on pps and ppt files - nothing happens. Before i try a re-install, is there any advice out there? Hi I would try running Office Diagnostics - open Word -> Office button -> Word Options -> Resources. Lucy -- Lucy Thomson PowerPoint MVP MOS Master Instructor www.aneasiertomorrow.com.au "mburwen" <mburwen@discussions.microsoft.com> wrote in message news:ED4D5277-7D79-45...

I cannot access newly created users
Hi folks... I have using exchange server. i can add users in Active directory successfully. But I cannot logon through IE or Outllok.. That is from today onwards i can create users but When I configuring in Outlook or when i tried to login through IE I get the following error message. "Sorry. User id and password could not be verified. Please re-enter your user id and password. more details... javax.mail.AuthenticationFailedException: Logon failure: unknown user name or bad password." This means the My Exchange did not recognize the newly created user name. But while I ...

can you move icons on the quick access toolbar
When you add a new command it is placed at the end of the list. I like to group similar commands together. How do you do this? If you go into the QAT editor, that is by selecting More Commands... from the options when you click the little dropdown arrow at the end of the QAT, you get a dialog that allows you to move items up and down. -- HTH Bob "Kathryn211" <Kathryn211@discussions.microsoft.com> wrote in message news:EC709D50-F0BF-4602-A428-7A1F8BB3213A@microsoft.com... > When you add a new command it is placed at the end of the list. I like to >...