Group:  Microsoft Access ยป microsoft.public.access.externaldata
Thread: Open MS access with batch file in design mode

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Open MS access with batch file in design mode
"Addy" <adnan.zamir[ at ]gmail.com> 11.07.2006 13:39:20
Hello there,

I have designed a database which opens in the compiled mode. Now when
you press the shift key it will open in design mode.

I want to open in design mode with a batch file. I have tried the
following code.

z:
CD\MED_SERVICE\Manpower
ManPower.mdb /x

It still opens in the compile mode. please let me know what syntax to
use.

Re: Open MS access with batch file in design mode
"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro[ at ]Spameater.orgZERO_SPAM> 11.07.2006 14:04:26
Hi, Addy.

[Quoted Text]
> It still opens in the compile mode. please let me know what syntax to
> use.

There isn't any. Batch files are not capable of simulating the pressing of
the <SHIFT> key. You'll need to press the <SHIFT> key manually if you want
to use a batch file.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.


"Addy" <adnan.zamir[ at ]gmail.com> wrote in message
news:1152625160.875099.64510[ at ]35g2000cwc.googlegroups.com...
> Hello there,
>
> I have designed a database which opens in the compiled mode. Now when
> you press the shift key it will open in design mode.
>
> I want to open in design mode with a batch file. I have tried the
> following code.
>
> z:
> CD\MED_SERVICE\Manpower
> ManPower.mdb /x
>
> It still opens in the compile mode. please let me know what syntax to
> use.
>


Re: Open MS access with batch file in design mode
"Addy" <adnan.zamir[ at ]gmail.com> 11.07.2006 14:04:42
Hi there,

Basically I will use the batch file to run some macros. Can I still run
the macros without pressing the shift key?


'69 Camaro wrote:
[Quoted Text]
> Hi, Addy.
>
> > It still opens in the compile mode. please let me know what syntax to
> > use.
>
> There isn't any. Batch files are not capable of simulating the pressing of
> the <SHIFT> key. You'll need to press the <SHIFT> key manually if you want
> to use a batch file.
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
> info.
>
>
> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
> news:1152625160.875099.64510[ at ]35g2000cwc.googlegroups.com...
> > Hello there,
> >
> > I have designed a database which opens in the compiled mode. Now when
> > you press the shift key it will open in design mode.
> >
> > I want to open in design mode with a batch file. I have tried the
> > following code.
> >
> > z:
> > CD\MED_SERVICE\Manpower
> > ManPower.mdb /x
> >
> > It still opens in the compile mode. please let me know what syntax to
> > use.
> >

Re: Open MS access with batch file in design mode
"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro[ at ]Spameater.orgZERO_SPAM> 11.07.2006 14:33:37
Hi, Addy.

Yes. But your startup options will still run unless you press the <SHIFT>
key while opening the database. Apparently, that's what you want when it's
set up for the users ("compile mode," as you called it). If you press the
<SHIFT> key while opening the database, it will be set up for development
("design mode," as you called it).

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.


"Addy" <adnan.zamir[ at ]gmail.com> wrote in message
news:1152626682.142316.309410[ at ]s13g2000cwa.googlegroups.com...
[Quoted Text]
> Hi there,
>
> Basically I will use the batch file to run some macros. Can I still run
> the macros without pressing the shift key?
>
>
> '69 Camaro wrote:
>> Hi, Addy.
>>
>> > It still opens in the compile mode. please let me know what syntax to
>> > use.
>>
>> There isn't any. Batch files are not capable of simulating the pressing
>> of
>> the <SHIFT> key. You'll need to press the <SHIFT> key manually if you
>> want
>> to use a batch file.
>>
>> HTH.
>> Gunny
>>
>> See http://www.QBuilt.com for all your database needs.
>> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
>> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
>> info.
>>
>>
>> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
>> news:1152625160.875099.64510[ at ]35g2000cwc.googlegroups.com...
>> > Hello there,
>> >
>> > I have designed a database which opens in the compiled mode. Now when
>> > you press the shift key it will open in design mode.
>> >
>> > I want to open in design mode with a batch file. I have tried the
>> > following code.
>> >
>> > z:
>> > CD\MED_SERVICE\Manpower
>> > ManPower.mdb /x
>> >
>> > It still opens in the compile mode. please let me know what syntax to
>> > use.
>> >
>


Re: Open MS access with batch file in design mode
"Addy" <adnan.zamir[ at ]gmail.com> 11.07.2006 14:41:03
Ok maybe I should be more clear on what I want.

The batch file will be run nightly to copy csv files into tables. This
way the database will be kepy current. I have made a macro for doing
this, and the macro will be run via a batch file.

Now the same database also has data entry forms. When the user opens
it, the startup runs those forms and nothing else. I have hidden
everything else. I dont want to user going to play around with the
tables, queries and the macros.

This is why I wanted to go in design mode with the batch file so that
it has access to the macros. Is there a better way to do this?

I


'69 Camaro wrote:
[Quoted Text]
> Hi, Addy.
>
> Yes. But your startup options will still run unless you press the <SHIFT>
> key while opening the database. Apparently, that's what you want when it's
> set up for the users ("compile mode," as you called it). If you press the
> <SHIFT> key while opening the database, it will be set up for development
> ("design mode," as you called it).
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
> info.
>
>
> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
> news:1152626682.142316.309410[ at ]s13g2000cwa.googlegroups.com...
> > Hi there,
> >
> > Basically I will use the batch file to run some macros. Can I still run
> > the macros without pressing the shift key?
> >
> >
> > '69 Camaro wrote:
> >> Hi, Addy.
> >>
> >> > It still opens in the compile mode. please let me know what syntax to
> >> > use.
> >>
> >> There isn't any. Batch files are not capable of simulating the pressing
> >> of
> >> the <SHIFT> key. You'll need to press the <SHIFT> key manually if you
> >> want
> >> to use a batch file.
> >>
> >> HTH.
> >> Gunny
> >>
> >> See http://www.QBuilt.com for all your database needs.
> >> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> >> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
> >> info.
> >>
> >>
> >> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
> >> news:1152625160.875099.64510[ at ]35g2000cwc.googlegroups.com...
> >> > Hello there,
> >> >
> >> > I have designed a database which opens in the compiled mode. Now when
> >> > you press the shift key it will open in design mode.
> >> >
> >> > I want to open in design mode with a batch file. I have tried the
> >> > following code.
> >> >
> >> > z:
> >> > CD\MED_SERVICE\Manpower
> >> > ManPower.mdb /x
> >> >
> >> > It still opens in the compile mode. please let me know what syntax to
> >> > use.
> >> >
> >

Re: Open MS access with batch file in design mode
"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro[ at ]Spameater.orgZERO_SPAM> 11.07.2006 15:25:53
Hi, Addy.

If you use a batch file to automate this, then the startup options are going
to execute. If you want to use a command-line switch when opening the
database file, then you'll have to tell the operating system not to use the
"don't make me think" method of opening files. If you check your file type
settings, you'll find that the default option is to open the database file
using the "C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe"
executable (if you're using Access 2003) without any command-line arguments
(options). So if you "tell" Windows to open the MDB file with a batch file,
Windows shortcut, or in a DOS shell and only provide the file name, all you
get is the "don't make me think" option, so any command-line switches will
be ignored.

If you want to execute a macro that is stored in an MDB file, then the
syntax is as follows (watch out for word wrap, as this is all one line):

"C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe" C:\Data\MyDB.mdb
/x mcrOpenMainForm

And don't put any spaces in the path, file name or macro name, because that
means "that's the end of this parameter and the next parameter follows."

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.


"Addy" <adnan.zamir[ at ]gmail.com> wrote in message
news:1152628863.048384.194290[ at ]s13g2000cwa.googlegroups.com...
[Quoted Text]
> Ok maybe I should be more clear on what I want.
>
> The batch file will be run nightly to copy csv files into tables. This
> way the database will be kepy current. I have made a macro for doing
> this, and the macro will be run via a batch file.
>
> Now the same database also has data entry forms. When the user opens
> it, the startup runs those forms and nothing else. I have hidden
> everything else. I dont want to user going to play around with the
> tables, queries and the macros.
>
> This is why I wanted to go in design mode with the batch file so that
> it has access to the macros. Is there a better way to do this?
>
> I
>
>
> '69 Camaro wrote:
>> Hi, Addy.
>>
>> Yes. But your startup options will still run unless you press the
>> <SHIFT>
>> key while opening the database. Apparently, that's what you want when
>> it's
>> set up for the users ("compile mode," as you called it). If you press
>> the
>> <SHIFT> key while opening the database, it will be set up for development
>> ("design mode," as you called it).
>>
>> HTH.
>> Gunny
>>
>> See http://www.QBuilt.com for all your database needs.
>> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
>> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
>> info.
>>
>>
>> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
>> news:1152626682.142316.309410[ at ]s13g2000cwa.googlegroups.com...
>> > Hi there,
>> >
>> > Basically I will use the batch file to run some macros. Can I still run
>> > the macros without pressing the shift key?
>> >
>> >
>> > '69 Camaro wrote:
>> >> Hi, Addy.
>> >>
>> >> > It still opens in the compile mode. please let me know what syntax
>> >> > to
>> >> > use.
>> >>
>> >> There isn't any. Batch files are not capable of simulating the
>> >> pressing
>> >> of
>> >> the <SHIFT> key. You'll need to press the <SHIFT> key manually if you
>> >> want
>> >> to use a batch file.
>> >>
>> >> HTH.
>> >> Gunny
>> >>
>> >> See http://www.QBuilt.com for all your database needs.
>> >> See http://www.Access.QBuilt.com for Microsoft Access tips and
>> >> tutorials.
>> >> http://www.Access.QBuilt.com/html/expert_contributors2.html for
>> >> contact
>> >> info.
>> >>
>> >>
>> >> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
>> >> news:1152625160.875099.64510[ at ]35g2000cwc.googlegroups.com...
>> >> > Hello there,
>> >> >
>> >> > I have designed a database which opens in the compiled mode. Now
>> >> > when
>> >> > you press the shift key it will open in design mode.
>> >> >
>> >> > I want to open in design mode with a batch file. I have tried the
>> >> > following code.
>> >> >
>> >> > z:
>> >> > CD\MED_SERVICE\Manpower
>> >> > ManPower.mdb /x
>> >> >
>> >> > It still opens in the compile mode. please let me know what syntax
>> >> > to
>> >> > use.
>> >> >
>> >
>


Re: Open MS access with batch file in design mode
"Addy" <adnan.zamir[ at ]gmail.com> 11.07.2006 15:47:40
Thanks Camaro,

I got it working. Many thanks for your time.
'69 Camaro wrote:
[Quoted Text]
> Hi, Addy.
>
> If you use a batch file to automate this, then the startup options are going
> to execute. If you want to use a command-line switch when opening the
> database file, then you'll have to tell the operating system not to use the
> "don't make me think" method of opening files. If you check your file type
> settings, you'll find that the default option is to open the database file
> using the "C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe"
> executable (if you're using Access 2003) without any command-line arguments
> (options). So if you "tell" Windows to open the MDB file with a batch file,
> Windows shortcut, or in a DOS shell and only provide the file name, all you
> get is the "don't make me think" option, so any command-line switches will
> be ignored.
>
> If you want to execute a macro that is stored in an MDB file, then the
> syntax is as follows (watch out for word wrap, as this is all one line):
>
> "C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe" C:\Data\MyDB.mdb
> /x mcrOpenMainForm
>
> And don't put any spaces in the path, file name or macro name, because that
> means "that's the end of this parameter and the next parameter follows."
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
> info.
>
>
> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
> news:1152628863.048384.194290[ at ]s13g2000cwa.googlegroups.com...
> > Ok maybe I should be more clear on what I want.
> >
> > The batch file will be run nightly to copy csv files into tables. This
> > way the database will be kepy current. I have made a macro for doing
> > this, and the macro will be run via a batch file.
> >
> > Now the same database also has data entry forms. When the user opens
> > it, the startup runs those forms and nothing else. I have hidden
> > everything else. I dont want to user going to play around with the
> > tables, queries and the macros.
> >
> > This is why I wanted to go in design mode with the batch file so that
> > it has access to the macros. Is there a better way to do this?
> >
> > I
> >
> >
> > '69 Camaro wrote:
> >> Hi, Addy.
> >>
> >> Yes. But your startup options will still run unless you press the
> >> <SHIFT>
> >> key while opening the database. Apparently, that's what you want when
> >> it's
> >> set up for the users ("compile mode," as you called it). If you press
> >> the
> >> <SHIFT> key while opening the database, it will be set up for development
> >> ("design mode," as you called it).
> >>
> >> HTH.
> >> Gunny
> >>
> >> See http://www.QBuilt.com for all your database needs.
> >> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> >> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
> >> info.
> >>
> >>
> >> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
> >> news:1152626682.142316.309410[ at ]s13g2000cwa.googlegroups.com...
> >> > Hi there,
> >> >
> >> > Basically I will use the batch file to run some macros. Can I still run
> >> > the macros without pressing the shift key?
> >> >
> >> >
> >> > '69 Camaro wrote:
> >> >> Hi, Addy.
> >> >>
> >> >> > It still opens in the compile mode. please let me know what syntax
> >> >> > to
> >> >> > use.
> >> >>
> >> >> There isn't any. Batch files are not capable of simulating the
> >> >> pressing
> >> >> of
> >> >> the <SHIFT> key. You'll need to press the <SHIFT> key manually if you
> >> >> want
> >> >> to use a batch file.
> >> >>
> >> >> HTH.
> >> >> Gunny
> >> >>
> >> >> See http://www.QBuilt.com for all your database needs.
> >> >> See http://www.Access.QBuilt.com for Microsoft Access tips and
> >> >> tutorials.
> >> >> http://www.Access.QBuilt.com/html/expert_contributors2.html for
> >> >> contact
> >> >> info.
> >> >>
> >> >>
> >> >> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
> >> >> news:1152625160.875099.64510[ at ]35g2000cwc.googlegroups.com...
> >> >> > Hello there,
> >> >> >
> >> >> > I have designed a database which opens in the compiled mode. Now
> >> >> > when
> >> >> > you press the shift key it will open in design mode.
> >> >> >
> >> >> > I want to open in design mode with a batch file. I have tried the
> >> >> > following code.
> >> >> >
> >> >> > z:
> >> >> > CD\MED_SERVICE\Manpower
> >> >> > ManPower.mdb /x
> >> >> >
> >> >> > It still opens in the compile mode. please let me know what syntax
> >> >> > to
> >> >> > use.
> >> >> >
> >> >
> >

Re: Open MS access with batch file in design mode
"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro[ at ]Spameater.orgZERO_SPAM> 11.07.2006 16:02:13
You're welcome. Glad it helped.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.


"Addy" <adnan.zamir[ at ]gmail.com> wrote in message
news:1152632860.548440.206170[ at ]m73g2000cwd.googlegroups.com...
[Quoted Text]
> Thanks Camaro,
>
> I got it working. Many thanks for your time.
> '69 Camaro wrote:
>> Hi, Addy.
>>
>> If you use a batch file to automate this, then the startup options are
>> going
>> to execute. If you want to use a command-line switch when opening the
>> database file, then you'll have to tell the operating system not to use
>> the
>> "don't make me think" method of opening files. If you check your file
>> type
>> settings, you'll find that the default option is to open the database
>> file
>> using the "C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe"
>> executable (if you're using Access 2003) without any command-line
>> arguments
>> (options). So if you "tell" Windows to open the MDB file with a batch
>> file,
>> Windows shortcut, or in a DOS shell and only provide the file name, all
>> you
>> get is the "don't make me think" option, so any command-line switches
>> will
>> be ignored.
>>
>> If you want to execute a macro that is stored in an MDB file, then the
>> syntax is as follows (watch out for word wrap, as this is all one line):
>>
>> "C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe"
>> C:\Data\MyDB.mdb
>> /x mcrOpenMainForm
>>
>> And don't put any spaces in the path, file name or macro name, because
>> that
>> means "that's the end of this parameter and the next parameter follows."
>>
>> HTH.
>> Gunny
>>
>> See http://www.QBuilt.com for all your database needs.
>> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
>> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
>> info.
>>
>>
>> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
>> news:1152628863.048384.194290[ at ]s13g2000cwa.googlegroups.com...
>> > Ok maybe I should be more clear on what I want.
>> >
>> > The batch file will be run nightly to copy csv files into tables. This
>> > way the database will be kepy current. I have made a macro for doing
>> > this, and the macro will be run via a batch file.
>> >
>> > Now the same database also has data entry forms. When the user opens
>> > it, the startup runs those forms and nothing else. I have hidden
>> > everything else. I dont want to user going to play around with the
>> > tables, queries and the macros.
>> >
>> > This is why I wanted to go in design mode with the batch file so that
>> > it has access to the macros. Is there a better way to do this?
>> >
>> > I
>> >
>> >
>> > '69 Camaro wrote:
>> >> Hi, Addy.
>> >>
>> >> Yes. But your startup options will still run unless you press the
>> >> <SHIFT>
>> >> key while opening the database. Apparently, that's what you want when
>> >> it's
>> >> set up for the users ("compile mode," as you called it). If you press
>> >> the
>> >> <SHIFT> key while opening the database, it will be set up for
>> >> development
>> >> ("design mode," as you called it).
>> >>
>> >> HTH.
>> >> Gunny
>> >>
>> >> See http://www.QBuilt.com for all your database needs.
>> >> See http://www.Access.QBuilt.com for Microsoft Access tips and
>> >> tutorials.
>> >> http://www.Access.QBuilt.com/html/expert_contributors2.html for
>> >> contact
>> >> info.
>> >>
>> >>
>> >> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
>> >> news:1152626682.142316.309410[ at ]s13g2000cwa.googlegroups.com...
>> >> > Hi there,
>> >> >
>> >> > Basically I will use the batch file to run some macros. Can I still
>> >> > run
>> >> > the macros without pressing the shift key?
>> >> >
>> >> >
>> >> > '69 Camaro wrote:
>> >> >> Hi, Addy.
>> >> >>
>> >> >> > It still opens in the compile mode. please let me know what
>> >> >> > syntax
>> >> >> > to
>> >> >> > use.
>> >> >>
>> >> >> There isn't any. Batch files are not capable of simulating the
>> >> >> pressing
>> >> >> of
>> >> >> the <SHIFT> key. You'll need to press the <SHIFT> key manually if
>> >> >> you
>> >> >> want
>> >> >> to use a batch file.
>> >> >>
>> >> >> HTH.
>> >> >> Gunny
>> >> >>
>> >> >> See http://www.QBuilt.com for all your database needs.
>> >> >> See http://www.Access.QBuilt.com for Microsoft Access tips and
>> >> >> tutorials.
>> >> >> http://www.Access.QBuilt.com/html/expert_contributors2.html for
>> >> >> contact
>> >> >> info.
>> >> >>
>> >> >>
>> >> >> "Addy" <adnan.zamir[ at ]gmail.com> wrote in message
>> >> >> news:1152625160.875099.64510[ at ]35g2000cwc.googlegroups.com...
>> >> >> > Hello there,
>> >> >> >
>> >> >> > I have designed a database which opens in the compiled mode. Now
>> >> >> > when
>> >> >> > you press the shift key it will open in design mode.
>> >> >> >
>> >> >> > I want to open in design mode with a batch file. I have tried the
>> >> >> > following code.
>> >> >> >
>> >> >> > z:
>> >> >> > CD\MED_SERVICE\Manpower
>> >> >> > ManPower.mdb /x
>> >> >> >
>> >> >> > It still opens in the compile mode. please let me know what
>> >> >> > syntax
>> >> >> > to
>> >> >> > use.
>> >> >> >
>> >> >
>> >
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net