Can anyone help please ?
I am building a query tool to search for stored docs.
In the tables are fields such as DWDOCID(primary key) DWPAGECOUNT(amount of pages) and account numbers.
With these fields a calculation is done to calculate the 2 subfolders where this doc is stored.
I have created a combobox and a subform,a user searches for an account number,and on the subform the result is displayed.After selecting a record and clicking a button the doc is displayed.
I am getting there,but,right now,always the first record is displayed,in stead of the selected record,can anyone help me please ? This is the code behind the button:
Option Compare Database
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
Public Sub Command4_Click()
' Calculate subfolders,display path and filename and extension
Dim intSubmap1 As Integer
Dim intSubmap2 As Integer
Dim intExt As Integer
Dim A As Long
Dim myVar As Byte
intExt = 1
DWCOUNTER = DWDOCID
intSubmap1 = Int(DWCOUNTER / (CLng(256) * 256))
intSubmap2 = Int(DWCOUNTER / 256) And 255 And 255
map1 = Format(intSubmap1, "000")
map2 = Format(intSubmap2, "000")
Do While intExt <= DWPAGECOUNT
A = Shell("C:\Program Files\Common Files\microsoft shared\MODI\11.0\MSPVIEW.EXE D:/" & "GIRONR" & "." & Format(DWDISKNO, "000") & "/" & map1 & "/" & map2 & "/" & Format(DWCOUNTER, "00000000") & "." & Format(intExt, "000"))
' MsgBox "Uw dossier bestaat uit " & DWPAGECOUNT & " blz " & "D:/" & map1 & "/" & map2 & "/" & Format(DWCOUNTER, "00000000") & "." & Format(intExt, "000")
intExt = intExt + 1
DWCOUNTER = DWCOUNTER + 1
myVar = MsgBox("Wilt u de volgende pagina bekijken?", vbYesNo + vbQuestion)
If myVar = 7 Then Exit Sub
Loop
End Sub
Thanks a lot !!