PDA

Click to See Complete Forum and Search --> : Access 97 - 2002


lazy
Mar 21st, 2005, 03:31 AM
I've got this VBA application in Access97 that can't be replaced. It's an old system but my employer doesn't want to replace it. Now the problem is that most people working with us, work in Access 2002. So if they open the VBA application in 2002 they get this message 'convert db'. You know what I mean.

How can you make it possible to open this application automatically in Access97. I want to do this so the users can't do anything wrong. They work using a shortcut on there desktop.

Any help is welcome. I know this is possible, but I just don't know how.

Ecniv
Mar 21st, 2005, 04:40 AM
Assuming they have access to MS Access 97 you can shortcut the link from that, and specify the db path (again assuming it doesn't change).

Or if you are allowed, I would make a 2002 version front end, the backend can stay as 97. Then you can use the 2002 front ends to update the 97 back ends whilst still allowing the 97 front ends to edit things too.

Your choice.

lazy
Mar 21st, 2005, 06:40 AM
How works the shortcutting thing? I know how to create a shortcut, but how can I link the db to that shortcut?

Ecniv
Mar 21st, 2005, 08:23 AM
You could shortcut the mdb file - but as you've probably seen this won't select the access you want.

If you copy a shortcut to Access 97 though, then open it (right mouse > properties) the paths is there. Now you can add extra bits to the path (described in a help file somewhere) including a file to run and a workgroup/user/pwd as required. You can also suppress the popup that says its access.

Start Microsoft Access with command-line options

Start Microsoft Access with command-line options using a shortcut
Open the folder where Microsoft Access is installed (typically the folder will be named Office in the Microsoft Office subfolder of the Program Files folder on your C drive).


Right-click the Microsoft Access program icon, and then click Create Shortcut.


Right-click the shortcut icon just created, click Properties, and then click the Shortcut tab.


Click to the right of the Microsoft Access startup command in the Target box, and then type the desired command-line options.
For example, the following command line starts Microsoft Access, opens the Northwind sample database for exclusive access.

"C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb" /excl

To display the list of command-line options, click .

Note After you create a shortcut you can put it on your desktop or in a folder, or add it to the Start menu. Search Windows Help for "shortcuts" for more information.

You can also create a shortcut to open any Microsoft Access database object directly from Windows.

For more information, click .


Startup command-line options
The following table lists the Microsoft Access command-line options.

Option Effect Applies To
database Opens the specified Microsoft Access database or Microsoft Access project. Include a path if necessary. If you are running Microsoft Windows 95, the default path is your My Documents folder. Access database or Access project
/excl Opens the specified Access database for exclusive access. To open the database for shared access in a multiuser environment, omit this option. Access database only
/ro Opens the specified Access database or Access project for read-only access. Access database or Access project
/user user name Starts Microsoft Access by using the specified user name. Access database only
/pwd password Starts Microsoft Access by using the specified password. Access database only
/profile user profile Starts Microsoft Access by using the options in the specified user profile instead of the standard Windows Registry settings created when you installed Microsoft Access. This replaces the /ini option used in versions of Microsoft Access prior to Access 97 to specify an initialization file. Access database or Access project
/compact target database or target Access project Compacts and repairs the Access database, or compacts the Access project that was specified before the /compact option, and then closes Microsoft Access. If you omit a target file name following the /compact option, the file is compacted to the original name and folder. To compact to a different name, specify a target file. If you don't include a path in target database or target Access project, the target file is created in your My Documents folder by default.
In an Access project, this option compacts the Access project (.adp) file but not the Microsoft SQL Server database.
Access database or Access project
/repair Repairs the Access database that was specified before the /repair option, and then closes Microsoft Access.
In Microsoft Access 2000, compact and repair functionality is combined under /compact. The /repair option is supported for backward compatibility.
Access database only
/convert target database Converts a previous-version Access database to an Access 2000 database with a new name, and then closes Microsoft Access. You must specify the source database before you use the /convert option. Access database only
/x macro Starts Microsoft Access and runs the specified macro. Another way to run a macro when you open a database is to use an AutoExec macro. Access database or Access project
/cmd Specifies that what follows on the command line is the value that will be returned by the Command function. This option must be the last option on the command line. You can use a semicolon (;) as an alternative to /cmd.
For information on the Command function, click .
Access database or Access project
/nostartup Starts Microsoft Access without displaying the startup dialog box (the second dialog box that you see when you start Microsoft Access). Access database or Access project
/wrkgrp workgroup
information file Starts Microsoft Access by using the specified workgroup information file. Access database only


Notes

To run a Visual Basic for Applications procedure when you open a database, use the RunCode action in the AutoExec macro or in the macro that you run by using the command-line option /x. You can also run a Visual Basic procedure when you open a database by creating a form with a Visual Basic procedure defined for its OnOpen event. Designate this form as the startup form by right-clicking the Database window, clicking Startup, and then entering that form in the Display Form/Page box.


To specify a forward slash (/) or semicolon (;) on the command line, type the character twice. For example, to specify the password ;mjs/md on the command line, type ;;mjs//md following the /pwd command-line option.


Its in the helpfile for future reference... But that lot should cover it all

Good luck :thumb: