William Benson (VBACreations.com)
vbacreations at gmail.com
Thu Oct 21 13:20:55 CDT 2010
Cool, worked like a charm Lambert. I stored a shortcut instead of the actual batch command ... then copied the icon file location for MS Access from one of the other shortcuts and edited the icon for the new shortcut accordingly. I like the tips/tricks I pick up here in this Access forum. I just wish I knew how to build databases. ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Thursday, October 21, 2010 10:15 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Decompile / compile Compact/Decompile duh! However, this works (in XP,and should in W7) Create a batch file containing this command... "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" %1 /compact ... And copy it into your Send To folder. Note that there are *no quotes* around the %1, unlike what is needed for the Context menu command. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.com) Sent: Thursday, October 21, 2010 9:42 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Decompile / compile >> " Hit the 'Advanced' button and then click the 'New' button. " I think this functionality is gone in Windows Vista/7. I have hunted around in the Control Panel Home, Default Programs panel, which is the (in my view poor and very poorly documented) replacement for the extra functionality that used to be present in Folder Options in XP... and cannot find the equivalent for creating a new Action. Any help appreciated. I could follow everything you said in my head, just not on my PC! BTW ... you meant to say the "The syntax for the [Compact] switch is ..." not the Decompile Switch, which apparently allows you to keep the target unspecified -- allowing the SendTo option. That seems a little inconsistent of Microsoft, since Compile/Decompile actually needs a database target as well to be functional, but seems to allow SendTo to receive the name of the database and perform the action. Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Thursday, October 21, 2010 9:06 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Decompile / compile William, "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /Compact does not do anything because there is no parameter there representing the actual file to compact. The syntax for the decompile switch is "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "X:\PathToSomeMdbfile\MyFile.mdb" /compact But if you create a shortcut with this as the target in the SendTo folder "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "%1" /compact The %1 parameter does not get substituted when you use it. For this reason I use the context menu feature of Windows (the right-click menu). In Explorer select Tools/Folder Options. Then select the File Types tab in the resulting dialog and locate the MDB file extension. Hit the 'Advanced' button and then click the 'New' button. The New Action dialog needs two entries: The name for the action (which will show up in the context menu): use Compact, and the command line for the action, which would be... "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "%1" /compact Now when you select Compact on the context menu, the "%1" parameter is substituted, and your file will be compacted. HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.com) Sent: Wednesday, October 20, 2010 4:51 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Decompile / compile One can find the Sendto folder my typing Shell:SendTo in the location bar. I just implemented the shortcuts for Compile and Decompile, and they appear to work. However, I tried to do the same thing with /Compact as suggested below -- right-click database, SendTo >> Access-Compact [shortcut] and it opened Access and shut access but did nothing to the database. I did not put the database's path in the target, I believe the point of the advice below is that you don't have to. Any reason this doesn't work with Target = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /Compact ?? -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Wednesday, October 20, 2010 1:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Decompile / compile I've always created a shortcut for decompile and placed them both in my Send to folder WinXP is C:\Documents and Settings\UserName\SendTo Vista/7 is C:\Users\user name\AppData\Roaming\Microsoft\Windows\SendTo Simply right click on your mdb choose send to then Access- Decompile. On Wed, Oct 20, 2010 at 9:16 AM, John Bartow <john at winhaven.net> wrote: > I've always decompiled, compacted, complied. I am just a cynic about > things I can't see for sure ;o) > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Wednesday, October 20, 2010 9:10 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Decompile / compile > > I use a shortcut to Access with the /Decompile switch such that when I > use that shortcut Access opens with the decompile stuff. I then open > the container I want to decompile and the decompile happens. > > I have always then closed Access and opened it again through another > shortcut so that the decompile is not being used. > > My question is, can I do the decompile, and then just compile without > closing and reopening Access. > I assume that I can but I have never been sure on that. > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com