L
Lee
Hi everyone,
I'm getting Error Code 3251 saying that the operation is
not supported for this type of object.
I'm to trying add some text to a field called CentreNotes
in the table tbl_Centres.
Can you help?
Dim varReport As Variant
Dim stDocName As String
Dim intResponse As Integer
Dim db As Database
Dim rs As Recordset
Dim stChunk As String
Set db = CurrentDb()
Set rs = db.OpenRecordset("tbl_Centres")
stChunk = vbCrLf & "Standard Letter 4 (security
confirmed) sent " & Date
varReport = Me!txtReportID
intResponse = MsgBox("You are about to produce Standard
Letter 4 (security confirmed) for Centre " &
Me.txtCentreNumber & "." _
& vbCrLf & vbCrLf & "Do you want to
continue?", vbQuestion + vbYesNo +
vbDefaultButton2, "Continue?")
If intResponse = vbNo Then
Exit Sub
Else
DoCmd.Echo False
DoCmd.SetWarnings False
chkLetter4 = True
DoCmd.OpenQuery "qry_TempLetterSecConfirmed",
acViewNormal, acAdd
DoCmd.OpenQuery "qry_AppendLetter", acViewNormal,
acAdd
DoCmd.SelectObject acForm, "frm_InspectionReports",
False
rs.FindFirst "CentreNo=" & txtCentreNumber
With rs
.Edit
!CentreNotes.AppendChunk stChunk
.Update
End With
DoCmd.Requery
DoCmd.GoToControl "txtReportID"
DoCmd.FindRecord varReport, acEntire, False,
acSearchAll, True, acCurrent, True
DoCmd.GoToControl "Page2"
DoCmd.SetWarnings True
DoCmd.Echo True
stDocName = "rpt_SecurityConfirmed"
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
rs.Close
End If
Thanks for your help.
Lee
I'm getting Error Code 3251 saying that the operation is
not supported for this type of object.
I'm to trying add some text to a field called CentreNotes
in the table tbl_Centres.
Can you help?
Dim varReport As Variant
Dim stDocName As String
Dim intResponse As Integer
Dim db As Database
Dim rs As Recordset
Dim stChunk As String
Set db = CurrentDb()
Set rs = db.OpenRecordset("tbl_Centres")
stChunk = vbCrLf & "Standard Letter 4 (security
confirmed) sent " & Date
varReport = Me!txtReportID
intResponse = MsgBox("You are about to produce Standard
Letter 4 (security confirmed) for Centre " &
Me.txtCentreNumber & "." _
& vbCrLf & vbCrLf & "Do you want to
continue?", vbQuestion + vbYesNo +
vbDefaultButton2, "Continue?")
If intResponse = vbNo Then
Exit Sub
Else
DoCmd.Echo False
DoCmd.SetWarnings False
chkLetter4 = True
DoCmd.OpenQuery "qry_TempLetterSecConfirmed",
acViewNormal, acAdd
DoCmd.OpenQuery "qry_AppendLetter", acViewNormal,
acAdd
DoCmd.SelectObject acForm, "frm_InspectionReports",
False
rs.FindFirst "CentreNo=" & txtCentreNumber
With rs
.Edit
!CentreNotes.AppendChunk stChunk
.Update
End With
DoCmd.Requery
DoCmd.GoToControl "txtReportID"
DoCmd.FindRecord varReport, acEntire, False,
acSearchAll, True, acCurrent, True
DoCmd.GoToControl "Page2"
DoCmd.SetWarnings True
DoCmd.Echo True
stDocName = "rpt_SecurityConfirmed"
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
rs.Close
End If
Thanks for your help.
Lee