open form from URL

WimDC

Registered User.
Local time
Today, 19:15
Joined
Dec 26, 2012
Messages
16
Hi,
I searched multiple forums, but couldn't find an answer. Maybe there's no solution for my question...
Is it possible to open a certain form with a certain record-id from a URL? Database is shared and split (frontend/backend)

Suppose I have a database DBTEST.accdb and form DBFORM where I want to open that form with recordID = 5.

For the moment, I can open my database with a URL to a html-file with this code:

Code:
  <script type="text/javascript">
  window.onload=function openURL()
  {
      var shell = new ActiveXObject("WScript.Shell");
      shell.run("MSACCESS J:/Agfiles/080515/BRUGS_OMMELAND/TOEPASSINGEN/ACCESS/BROMONET.accdr /runtime");
  }
  </script>

But maybe there's another solution to open the form? With /cmd parameters??

Thanks

Wim
 
Hi. I think you got it. Try using the /cmd switch.
 
use /cmd to pass the recordid to an AutoExec macro that opens your form.

Cheers,
 
IIRC, you can only pass a switch to the db Command property if you use a shortcut to open the db and the switch has to be in the shortcut target property?
 
IIRC, you can only pass a switch to the db Command property if you use a shortcut to open the db and the switch has to be in the shortcut target property?
Not sure I understand that. A /cmd is a switch, just like /runtime. You can pass any text value to the /cmd switch.
 
You can pass any text value to the /cmd switch.
I know that, but isn't the goal to do something based on the db Command property value? I'm saying you can only pass a value to the db Command property value via a shortcut. At least, that's been my experience. Simply using a switch to open a file in some manner (e.g. as a runtime) is not the same thing as using the db Command property. If the goal isn't to use the db Command property, then I've misunderstood whatever the goal is.
 
I know that, but isn't the goal to do something based on the db Command property value? I'm saying you can only pass a value to the db Command property value via a shortcut. At least, that's been my experience. Simply using a switch to open a file in some manner (e.g. as a runtime) is not the same thing as using the db Command property. If the goal isn't to use the db Command property, then I've misunderstood whatever the goal is.
Not sure if this helps explain it, but the purpose of the /cmd switch is to pass an argument to the database file you're trying to open. For example.

Code:
MSACCESS.EXE "C:\FolderName\FileName.ACCDB" /cmd 77

So, the above command line passes the record ID #77 to the file. You can also combine switches. For example.

Code:
MSACCESS.EXE "C:\FolderName\FileName.ACCDB" /runtime /excl /ro /cmd 77 /x "MacroName"

So, in the above example, the macro "MacroName" might do something with the record with ID #77.
 
Last edited:
the purpose of the /cmd switch is to pass an argument to the database file
And that shows up (or at least, can) in the db Command property. Check it out if you've never heard about that property.
For the record, I'm not disputing what you say. I'm saying I thought the db Command property needed to be retrieved but apparently it isn't. I guess we can say I made an assumption. :eek:
 
Thanks everyone for all the help and I will try the suggestion of theDBguy
 

Users who are viewing this thread

Back
Top Bottom