Skip to main content

AccessTr.neT


Linkli tabloya data ekleme

Linkli tabloya data ekleme

Çözüldü #7
Ya delircem sanırım, yapamiorum çünkü Img-cray bilgi işlemden birilerine sordum, ama o da dediklerinizi yapmaya çalışıp başarılı olamadı...
Sledgeab; tabloya resmin yolunu kaydedip, excele aktardığında diyorsun, ama accessde bağlı tablo kullandığım için dışardan veri giremiyorum zaten accesse...excelde photo die bi sütun açıp oraya fotoğrafların yolunu hyperlink olarak kaydetttim. Accessde o data gözüküyor ama sadece path olarak gözüküyor, resim olarak açılamıyor. Excelde hücre formatı olarak sadece rakamsal formatlar olduğu için attachment ya da OLE gibi bir format yapıp Access'e o şekilde aktaramıyorum. İşin içinden çıkamadım. Sanırım bağlı tabloyla olmayacak bu iş Img-cray
Uğraşılarınız için çok teşekkür ederim.
Cevapla
Çözüldü #8
Teşekkürler Sledgeab, ama ilk başta da belirttiğim gibi, datayı excelden accesse bağladığım için, accesse data da giremiyorum, mevcut alanları da değiştiremiyorum Img-cray sen accessde yap, sonra excele at, sonra da accessde linki aktif görürsün diyorsun, ama accessde hiçbir değişiklik yapamiorum, bağlı olan Excel dosyayı read only gösteriyor...

Bilgi işlem departmanından birini çağırdım, acaba ben mi dediklerinizi anlayamıyor ve yapamiorum die (çünkü çok basit gibi yazmışsınız...), ama sonuc değişmedi...Sanırım bağlı tablo olunca resim eklenemiyor...Fur
Cevapla
Çözüldü #9
Çözümü buldum nihayet Az

Merak eden ya da ihtiyaç duyan varsa die yaziorum, daha önce açıklama yapanlara teşekkürler, ama benim için ya çok komplike açıklamalardı, ya da benim formum için gereksiz detay içeren çözümlerdi.

Çözüm ingilizce, o haliyle aktarıyorum, anlamayıp da ihtiyacı olanlar için yardımcı olabilirim...

How to include a bound picture on form:

While it's possible to actually store the images within the database itself as OLE objects, normally it's not the preferred way. When you embed an OLE object in a table, you're storing a lot of overhead as well. This overhead is the information about the object (such as it's parent application) that Access needs to store in order to render the object properly.

The preferred way to display images is to store the complete path and filename to the actual files themselves within a table, and then use the Image tool (in Access 97/2000) to update the display.

The following example shows you how to display Windows bitmap images, .gif files and .jpg files on a Microsoft Access form without storing the images in a Microsoft Access table.

Creating the Table to Store File and Path Data:


Create a new table that is named Imagetable and then add a text field that is named ImagePath.

Open the Imagetable table in Datasheet view and then add the path and the name of a bitmap file to each record. The following examples show how the records might look:

c:\windows\circles.bmp
c:\Documents and Settings\Graham\Desktop\Temp\switchboard.jpg
c:\windows\tiles.bmp
c:\Documents and Settings\Graham\Desktop\Temp\Graham.gif
c:\windows\bubbles.bmp

Displaying Images in a Form


Use the AutoForm: Columnar Wizard to create a new form that is based on the ImageTable table.

Open the Imageform form in Design view and then add an image control to the form by using the Image tool in the toolbox. You are prompted to select an image to insert. Select any image available on your computer. Name the control ImageFrame.

Set the OnCurrent property of the Imageform form to the following event procedure:

Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub


Set the AfterUpdate property of the ImagePath text box to the following event procedure:

Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub


Open the Imageform form in Form view. Notice that the form displays the corresponding bitmap for each record.
Note: You may need to amend the file paths and image names to correspond with images stored on your system.
Cevapla
Çözüldü #10
sn muse,

sorunuza örnek uygulama eklemezseniz yazılan cevaplar komplike açıklama veya gereksiz detay içeren çözümlerden oluşur. Size 6. mesajda verdiğim linkteki örnek uygulama sorunuzun çözümüydü zaten. Kendi uygulamanıza ekleyememiş olabilirsiniz. Örnek uygulamanızı ekleyin yardımcı olalım. linkteki örnekte bulunan kodu aşağıya yazayım belki tanıdık gelir.

Kod:
Private Sub Form_Current()
On Error GoTo err_Form_Current

    If Not Me!MKResim = "" Or Not IsNull(Me!MKResim) Then
        Me!ResimCercevesi.Picture = Me!MKResim
    Else
        Me!ResimCercevesi.Picture = ""
    End If
        
exit_Form_Current:
    Exit Sub
    
err_Form_Current:
    MsgBox err.Description
    Resume exit_Form_Current
End Sub

Cevapla
Çözüldü #11
Merhaba Sledgeab,

Tekrar sorun cıktı bende Img-cray Dediğin gibi örnek bir çalışma da ekledim bu sefer. Sorun şöyle, bir önceki mesajımda yazdığım kodu uygulayınca herşey normal çalışıyor. Fotoğrafları düzgünce gösteriyor. Ama accessi kapatıp tekrar açınca hiçbir fotoğrafı getirmiyor??? Sadece ilk yaptığım sefer çalışıyor. Linkler mi deactive oluyor ne oluyor anlamadım...Sevincim kursağımda kaldı mı derler ne derler...

Yardımcı olabilirseniz cok sevinirim...
Cevapla
Çözüldü #12
Kod:
Private Sub Form_Open(Cancel As Integer)
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

formunuza aşağıdaki kodu yazmalısınız.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task