Senin, 04 Maret 2013

[MS_AccessPros] On Format Event in Report Repeats twice (MS2010)

 

Why the event On Format in a Report is duplicating?

I would like to add code to populate a table inside the ON Format Event such as for ex:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Dim rstRS As Recordset
Dim strSQL As String
Dim dbsDB As Database

Set dbsDB = CurrentDb

strSQL = "SELECT * FROM tblSixYrHold"
Set rstRS = dbsDB.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)

With rstRS
.AddNew
!MseqNo=me.MasterFileNo
.Update
.Close
End With

Set dbsDB = Nothing

End Sub

Perhaps I could insert an Static counter to avoid duplication when the record is inserted in the recordset.....

Thanks a lot
Norbert

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar