473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Updating data in a Hyperlink or OLE type field.

1
Hi,

I'm using MS Access 2002 SP3 & Visual Basic 6.3 on WinXP Home SP2.

I have a table of condition data (5990 records) that relates to information stored in a proprietary application. The primary key in my table (MyKey) is the same as the key used to find data in the other windows application (C:\Folder\My.exe). So, if I am looking at a record in my table, say with ID = 100, I can view further information and images etc in my application by running:
Expand|Select|Wrap|Line Numbers
  1. C:\Folder\My.exe -i 100
Now going through lots of data manually like this would be painful, even if I only have to type in the ID each time. What I have been trying to do is put the information in either a Hyperlink or OLE field, so that I can click in the field and my other application will automatically be launched showing the right data.

I can't seem to do this with the Hyperlink field type, as it wont allow the command line parameter (-i 100). Hyperlink will only work to launch the application alone (no parameters).

I can do it perfectly using the OLE field type, inserting a link the the exe file as an 'Package' object, then editing this (right click, Package Object, Edit Package) using the Object Packager pop up window. In the Object Packager I do menu option Edit, Command Line and put in the full "C:\Folder\My.exe -i 100". Then I do File, Update and quit the Object Packager. Now my field displays "Package" and when I double click it, my application is loaded and shows ID 100 perfectly.

Now, how can I use an update query or even a VB script to run though the whole table and build these "Command Line" options in the OLE link field?

Any suggestions?

Thanks in advance, Rishi.
Dec 12 '07 #1
1 2658
NeoPa
32,556 Expert Mod 16PB
Try :
Expand|Select|Wrap|Line Numbers
  1. Dim strCmd As String
  2.  
  3. strCmd = "C:\Folder\My.exe -i " & Me.ControlName
  4. Call Shell(PathName:=strCmd, WindowStyle:=vbNormalFocus)
This assumes the value of the item you want is in a control on your form called ControlName. Obviously change to suit your own details.
Dec 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
4
by: Andreas Meffert | last post by:
Hello, How can I change the Type of a field in a table from Memo to hyperlink? I import a table from Oracle to Access 2003. After that, the field type of some hyperlink-fields is "Memo". How...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
3
by: Janelle.Dunlap | last post by:
I have an Excel spreadsheet containing a column of hyperlinks that I need to import into Access. I have no trouble importing (in my case actually linking) the spreadhsheet to the Access table,...
0
by: Scott | last post by:
I have a search form built with Access 97 and now I upgraded to Access 2003. On one field of the resulting form, I have a field of hyperlink data type containing the path of the file, i.e., Disk...
3
by: Trez | last post by:
Hey guys, Am new at using ASP.Net. am having some problems updating my SQL DB. whenever i try i get this Error. Can someone help me? Incorrect syntax near 'nvarchar'. Description: An unhandled...
0
by: TheDebbis | last post by:
I'm making a quick CD catalog to help me learn ASP.NET (using C# primarily.) I have a number of gridview's on my site that are working properly, but for some reason, one is not updating or deleting....
5
LAD
by: LAD | last post by:
Using Access 2003 on Windows 2000. My Skill Level: Med Low (Some VBA, okay with Access) Form: Single View - based on Query of single Table to sort by field. Application: Dealers email 'contract...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.