DocsVision 3.1


         

Dim rst, rstTMP, rstTMP2 As


Set rst = dbs.OpenRecordset(strSQL)

Set rstTMP = dbs.OpenRecordset("")

Do Until rstTMP.EOF

rstTMP.Delete

rstTMP.MoveNext

Loop

If rst.RecordCount = 0 Then

MsgBox (" ")

rstTMP.Close

rst.Close

dbs.Close

Me.Refresh

Exit Sub

End If

rst.MoveLast

j = rst.RecordCount

rst.MoveFirst

For i = 1 To j

rstTMP.AddNew

rstTMP![] = (rst![])

rstTMP![] = rst![]

If rst![] = 1 Then

rstTMP![] = ""

Else

rstTMP![] = ""

End If

rstTMP![] = CurrentDateWParam(rst![])

rstTMP![] = rst![]

rstTMP![] = rst![]

rstTMP![] = rst![]

rstTMP![] = rst![]

rstTMP![] = rst![]

rstTMP![] = rst![]

rstTMP![] = rst![]

rstTMP![] = rst![]

rst.MoveNext

rstTMP.Update

Next i

Me![].Form.Visible = -1

Me![Sub].Form.Visible = 0

rstTMP.Close

rst.Close

dbs.Close

Me.Refresh

End Sub

Private Sub _Click()

On Error GoTo Err_6_Click

Dim rst, rstTMP, rstTMP2 As Recordset

Dim rstTMP3 As Recordset

Dim rstTMP4 As Recordset

Dim rstTMP5 As Recordset

Dim dbs As Database

Dim i, j As Integer

Dim strSQL, strSQLTMP, strSQLTMP3 As String

Dim strSQLTMP2 As String

Dim As Date

DoCmd.Hourglass True

Set dbs = CurrentDb

strSQL = "SELECT DISTINCTROW ., . FROM [] WHERE (((.)=" & Me![] & ") AND ((.)<>0));"

Set rst = dbs.OpenRecordset(strSQL)

Set rstTMP4 = dbs.OpenRecordset("")