Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 3 odgovora
  • 2.467 pregleda

Najnovija ↓

Procedura za otvaranje file-a definisanog u polju 27.12.2005. u 15:34 · pre 253 meseca
izmenjeno 1 put, poslednji put Hamza 03.01.2006. u 20:44
  1. Hamza03.01.2006. u 20:44zapis iz teksta poruke
#1
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.
Re: Procedura za otvaranje file-a definisanog u polju 13.01.2006. u 22:45 · pre 253 meseca #3
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.
Re: Procedura za otvaranje file-a definisanog u polju 22.01.2006. u 21:53 · pre 252 meseca #4
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
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme