I have managed to launch an access form from an other program (ArcView GIS)by creating a shortcut to the form and using the shortcut's path. Is there a way to tell Access which record to open the form to from an external program?
OK I hope you can follow this<br><br>I use the following command line parameter to launch Access and pass a unique ID<br>In my case it was a PO number<br>"C:\Microsoft Office97\Office\MSACCESS.EXE" X:\Sales\-PrintPO.mdb /cmd 725909<br><br>First part is the Drive and full path to Access<br>Blank space<br>Drive and Full Path and name of Acccess database<br>Blank Space<br>/cmd<br>Blank Space<br>Unique ID which is passed to the following function<br><br>Create a Function in Access which finds your record<br>Public Function GetPO()<br> PONum = Left(command, 6)<br> GetPO = PONum<br>End Function<br><br>Create a query that has all of the fields and tables you need on your form.<br>The Criteria for your query is the function (in my case it was GetPO)<br>which looks like this in the query QBE grid<br>GetPO()<br><br>Next your forms record source is the above query<br><br>Then create an Autoexec macro that opens your form.<br><br>OK so to recap when you run the above comand line<br>1. It opens Access <br>2. loads your database<br>3. runs the autoexec macro<br> which opens the form<br> the forms recordsource is the query<br> which gets it criteria from the command line /cmd parameter<br>4. The form is setting on your specific record.<br><br>I am doing this right now so it does work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.