A
almond mendoza via AccessMonster.com
could anyone help me with this???
Option Compare Database
Option Explicit
Public db As DAO.Database
Public rs As DAO.Recordset
Public strSQL As String
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not rs.EOF Then
If rs.RecordCount > 0 Then
If (txtCounter Mod 2) = 0 Then
recRecord.Visible = True
Else
recRecord.Visible = False
End If
Me.txtappnumber = rs.Fields("AppNumber")
Me.txtsurname = rs.Fields("Surname")
Me.txtFirstname = rs.Fields("Firstname")
Me.Mobile = rs.Fields("Mobile")
Me.txtsex = rs.Fields("Sex")
Me.Remarks = rs.Fields("Remarks")
Me.txtage = (Date - rs.Fields("Birthday")) / 365
Me.Address = rs.Fields("City_Town") & " " & rs.Fields
("Province")
Me.CDegree = rs.Fields("CDegree")
Me.txtcivilstat = rs.Fields("CivilStat")
Me.Landline = rs.Fields("Landline")
rs.MoveNext
Debug.Print
End If
End If
End Sub
Private Sub Report_Close()
Set db = Nothing
Set rs = Nothing
End Sub
Private Sub Report_Open(Cancel As Integer)
Set db = CurrentDb
Set rs = db.OpenRecordset(pstrSQL)
If rs.RecordCount > 0 Then
Report.RecordSource = pstrSQL
Else
MsgBox "No report found"
End If
End Sub
Thank you in advance...
Option Compare Database
Option Explicit
Public db As DAO.Database
Public rs As DAO.Recordset
Public strSQL As String
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not rs.EOF Then
If rs.RecordCount > 0 Then
If (txtCounter Mod 2) = 0 Then
recRecord.Visible = True
Else
recRecord.Visible = False
End If
Me.txtappnumber = rs.Fields("AppNumber")
Me.txtsurname = rs.Fields("Surname")
Me.txtFirstname = rs.Fields("Firstname")
Me.Mobile = rs.Fields("Mobile")
Me.txtsex = rs.Fields("Sex")
Me.Remarks = rs.Fields("Remarks")
Me.txtage = (Date - rs.Fields("Birthday")) / 365
Me.Address = rs.Fields("City_Town") & " " & rs.Fields
("Province")
Me.CDegree = rs.Fields("CDegree")
Me.txtcivilstat = rs.Fields("CivilStat")
Me.Landline = rs.Fields("Landline")
rs.MoveNext
Debug.Print
End If
End If
End Sub
Private Sub Report_Close()
Set db = Nothing
Set rs = Nothing
End Sub
Private Sub Report_Open(Cancel As Integer)
Set db = CurrentDb
Set rs = db.OpenRecordset(pstrSQL)
If rs.RecordCount > 0 Then
Report.RecordSource = pstrSQL
Else
MsgBox "No report found"
End If
End Sub
Thank you in advance...