use data from selected record

bbouwer

Registered User.
Local time
Today, 19:30
Joined
Dec 23, 2009
Messages
17
Hi,

I am setting up a system around access to search for stored docs,docs are all stored in folders.The records contains all data around these docs.What i want is this,search in the combobox for a nr,the report gives me the result,while selecting a record in the report and clicking a button i want to view the file.I have this code thusfar:

Private Sub Combo2_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[DWDOCID] = " & Str(Nz(Me![Combo2], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Command4_Click()
' Calculate subfolders,display path and filename and extension
Dim intSubmap1 As Integer
Dim intSubmap2 As Integer
Dim intExt As Integer
intExt = 1
intSubmap1 = Int(DWDOCID / (CLng(256) * 256))
intSubmap2 = Int(DWDOCID / 256) And 255 And 255
map1 = Format(intSubmap1, "000")
map2 = Format(intSubmap2, "000")

MsgBox "Uw dossier bestaat uit " & DWPAGECOUNT & " blz " & "D:/" & map1 & "/" & map2 & "/" & Format(DWDOCID, "00000000") & "." & Format(intExt, "000")

End Sub

The messagebox is used to see what the data is.

My problem is this,when i have a result list of 10 records,and select a record,i only see the data of the first record.What do i have to do when i click on a record to see the data behind this record ?

thanks,

Bert.
 

Users who are viewing this thread

Back
Top Bottom