/* */

Saturday, November 12, 2011

[belajar-access] Re: Listbox

 


Rekan2 Accessers,

Setelah coba ini coba itu akhirnya masalah saya bisa teratasi.
Kalau mgkn bermanfaat, tsb koding pada form-nya

Private Sub Form_Current()
Dim path As String
On Error GoTo HideMe
path = "C:\IMAGES"
Me![Image5].Picture = path & "\" & ASSCODE & ".jpg"
GoTo nol
HideMe:
Me![Image5].Picture = ""
nol:
End Sub

Lalu koding pada Listboxnya sbb:

Private Sub List10_Click()

' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ASSCODE] = '" & Me![List10].Column(1) & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

SalamAccessers,
BambangMahfudin

--- In belajar-access@yahoogroups.com, "Bambang Mahfudin" <bambalid@...> wrote:
>
> Rekan2 Accesser mohon pencerahannya,
>
> Saya buat sebuah listbox yg isinya hanya "CODE" Dan sebuah Image pada form. Saya mengharapkan setiap kali saya klik data/code yg ada di listbox tsb gambarnya munculkan di Imange.
>
> Tsb codingnya :
>
> Private Sub List10_Click()
> Dim path As String
> On Error GoTo HideMe
> path = "C:\IMAGES"
> Me![Image5].Picture = path & "\" & Me.List10.ItemData(Me.List10.ListIndex) & ".jpg"
> GoTo nol
> HideMe:
> Me![Image5].Picture = ""
> nol:
> End Sub
>
> Kesalahannya ada dimana ???
>
> Terima kasih, Salam Accessers
> BambangMahfudin
>

__._,_.___
Recent Activity:
SPAM IS PROHIBITED
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

No comments:

Post a Comment