Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A sample is attached for your convenience. There is just one for with a table grid & button. You simply select the wanted record and push the button. Only the first record will work because it is an internet link. The second two are for local files but need to be set for your choosing and are included because it isn't know what OS you are on. Record ID #1 is for Linux file location and ID #2 is for Windows. These will open automatically to the default programs in your system.

The process isn't difficult but requires a macro attached to the After record change event of the form. The only extra setting in the push button is in the properties General tab under Action - set this to Open document/web page. Finally the macro needs to change if your table column name or button name changes.

How you set all this in your DB is up to you. Maybe having a correspondence table linked to the mailing list. It would allow you as many records as wanted.

Sample: GetExternal.odb

A sample is attached for your convenience. There is just one for with a table grid & button. You simply select the wanted record and push the button. Only the first record will work because it is an internet link. The second two are for local files but need to be set for your choosing and are included because it isn't know what OS you are on. Record ID #1 is for Linux file location and ID #2 is for Windows. These will open automatically to the default programs in your system.

The process isn't difficult but requires a macro attached to the After record change event of the form. The only extra setting in the push button is in the properties General tab under Action - set this to Open document/web page. Finally the macro needs to change if your table column name or button name changes.

How you set all this in your DB is up to you. Maybe having a correspondence table linked to the mailing list. It would allow you as many records as wanted.

Sample: GetExternal.odb

Edit: Here is the macro (also in sample) but with areas to possibly change:

Sub InsertLocation
Dim oForm as Object
Dim oButton as Object
oform = thiscomponent.drawpage.forms.getbyname("NAME-OF-YOUR-FORM-HERE")
oButton = oform.PUSH-BUTTON-NAME-HERE
oButton.TargetUrl = oform.Columns.getbyname("COLUMN-NAME-HERE").getstring
End Sub