[ Hamza @ 27.12.2005. 14:34 ] @
| Da li postoji mogičnost pravljenje procedure koja bi otvarala određeni file čija je adresa napisana u određenom polju u formi.
Naravno, da to ne bude Hiperlink.
Donedavno sam imao tabele u Accessu i one su u sebi imale polja sa Hyperlinkom. Sad sam dio tabela prebacio na SQL Server, (dok mi je aplikativni dio ostao u Access-u) i ne mogu da nađem opciju u SQL Serveru koja mi omogučava Hyperlink.
Ako se neko susretao sa sličnim problemom molio bih da mi pomogne.
[Ovu poruku je menjao Hamza dana 03.01.2006. u 20:44 GMT+1] |
[ Trtko @ 09.01.2006. 08:44 ] @
A koji File ????
sliku
tekst
Sto zelis ?
Ma mozes napraviti sve sto zelis i zamislis ??
[ Hamza @ 13.01.2006. 21:45 ] @
Dakle imamo tabelu i u njenom polju koje je Text imamo adresu file-a koja je string, npr
C:\Documents and Settings\My Documents\Doc1.doc
Treba mi dugme na formi koje će otvoriti bilo koji file čija je adresa definisana u ovom polju.
[ Hamza @ 22.01.2006. 20:53 ] @
Evo procedure i upute. Radi savršeno a i pruža više od Hyperlinka. Može otvoriti i definisani direktorij.
Hyperlink Property Example
The CreateHyperlink procedure in the following example sets the hyperlink properties for a command button, label, or image control to the address and subaddress values passed to the procedure. The address setting is an optional argument, because a hyperlink to an object in the current database uses only the subaddress setting, To try this example, create a form with two text box controls (txtAddress and txtSubAddress) and a command button (cmdFollowLink) and paste the following into the Declarations section of the form's module:
Private Sub cmdFollowLink_Click()
CreateHyperlink Me!cmdFollowLink, Me!txtSubAddress, _
Me!txtAddress
End Sub
Sub CreateHyperlink(ctlSelected As Control, _
strSubAddress As String, Optional strAddress As String)
Dim hlk As Hyperlink
Select Case ctlSelected.ControlType
Case acLabel, acImage, acCommandButton
Set hlk = ctlSelected.Hyperlink
With hlk
If Not IsMissing(strAddress) Then
.Address = strAddress
Else
.Address = ""
End If
.SubAddress = strSubAddress
.Follow
.Address = ""
.SubAddress = ""
End With
Case Else
MsgBox "The control '" & ctlSelected.Name _
& "' does not support hyperlinks."
End Select
End Sub
Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.