Can Access open up to a record that I specify?

hollifd

Board Regular
Joined
Apr 3, 2002
Messages
248
Is it possible to tell Access to open up and find a specific record much like you can tell notepad to open up and display a specific text file like:

Notepad.exe C:\Temp\mytextfile.txt

Ultimately, I want to include a link in a email message that when the user clicks on the link, the link will open up Access and display a specific record. So it might look something like this...

C:\Temp\MyDatabase.mdb 1234

Where 1234 is the record number.

Is this functionality possible?

The way that I currently am doing it is creating an email message with a text file attachment. The text file has the name of the record to find. I ask the user to save the attched text file to C:\Temp and then click on the link to the database. When the database opens, it looks for the text file and opens it and gets the record to search for.

I would like to find a way to include the search data in the link so that when the user clicks on the link, the database will open and find the record automatically.

I hope my explanation will be clear.

Thanks for any advice or alternate methods of doing this type of thing.

David
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

hollifd

Board Regular
Joined
Apr 3, 2002
Messages
248
Nevermind,

I figured it out. In case anyone needs to know, you can open access from the command line (or batch file) like this...

"C:\Program Files\Microsoft Office\Office11\Msaccess.exe" "C:\Temp\TestDB.mdb" /cmd "Hello World"

Then from VBA, you can get the command line information using this...

Search$ = Command
MsgBox Search$

Thanks,

David
 

Watch MrExcel Video

Forum statistics

Threads
1,114,385
Messages
5,547,650
Members
410,805
Latest member
Ginoji
Top