Feb 04 2022 08:34 AM
Hi,
Some code was written in the past that worked fine until this last week or so then we get error 3048. As per a lot of suggestions on this forum we have made the location of both the client end database and the root database on the network trusted, but still get this error.
As the code is a few years old I thought I would post to see if anyone knows of improvements we could make to it.
It is to send statements to different contacts, here is the code:
Private Sub Command62_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("qry_mass_emails")
Do Until rst.EOF
Me.unit_sales_unit_no_sel.value = rst("unit_no")
If DCount("id", "tbl_trans", "unit_no=" & Me.unit_sales_unit_no_sel.value & " AND flag=False AND contra=False") > 0 Then
Call sndrpt_unit_sales2
Else
Call sndrpt_unit_sales3
'DoCmd.SendObject , , , DLookup("email", "tbl_tenants", "id=" & DLookup("tenant", "tbl_units", "unit_no=" & Me.unit_sales_unit_no_sel)), , , "Sales Report", "Sorry, you have no sales transactions to report on." & Chr(10) & Chr(10) & "Regards" & Chr(10) & "Astra Antiques", False
End If
rst.MoveNext
Loop
rst.Close
DoCmd.Close
DoCmd.OpenForm "frm_menu_reports", , , stLinkCriteria
MsgBox "Mass E-Mails Sent"
End Sub
Thanks for your suggestions.
Katherine
Feb 21 2022 01:22 PM