markymarc69
December 2nd, 2004, 10:09 AM
I am trying to send a crystal report to the fax machine ( WinFAX Pro 10.03) via a click of the button in VB. The report itself generates fine in the Crystal reports design window itself.
While in VB Everything works fine here until it reaches the line with the ****.... I get "Not Enough Memory for Operation"... Any Ideas???? The system I am using it on has
memory to burn ...so I think it is something else????
Set dbDatabase = CurrentDb()
Set rs = New ADODB.Recordset
StrSql = "Select acctID,acctName,faxNum From tbl_Account WHERE docrtID=3"
rs.Open StrSql, goConn, adOpenForwardOnly
strCompany = "Company Name"
strReportName = "FAX REPORT"
Chan = DDEInitiate("FAXMNG", "CONTROL")
Do While Not rs.EOF
Chan = DDEInitiate("FAXMNG", "TRANSMIT")
DDEExecute Chan, "GoIdle"
faxNum = Chr$(34) & rs![faxNumber] & Chr$(34)
faxName = Chr$(34) & rs![accountName] & Chr$(34)
faxCompany = Chr$(34) & strCompany & Chr$(34)
faxSubject = Chr$(34) & strReportName & Chr$(34)
SendCriteria = faxNum + ",,," + faxName + "," + faxCompany + "," + faxSubject
DDEPoke Chan, "Sendfax", "showSendScreen(""0"")"
DDEPoke Chan, "Sendfax", "fillCoverPage(""0"")"
DDEPoke Chan, "Sendfax", "recipient(" + SendCriteria + ")"
CrystalReport1.SelectionFormula = "{tbl_Account.accountID} = '" & rs![accountID] & "'"
CrystalReport1.Action = 1 **** ' this generates the error "NOT Memory operation
Call PauseSeconds(5)
rs.MoveNext
Loop
Any help would be much aprreciated!!!
Thanks,
Marc
While in VB Everything works fine here until it reaches the line with the ****.... I get "Not Enough Memory for Operation"... Any Ideas???? The system I am using it on has
memory to burn ...so I think it is something else????
Set dbDatabase = CurrentDb()
Set rs = New ADODB.Recordset
StrSql = "Select acctID,acctName,faxNum From tbl_Account WHERE docrtID=3"
rs.Open StrSql, goConn, adOpenForwardOnly
strCompany = "Company Name"
strReportName = "FAX REPORT"
Chan = DDEInitiate("FAXMNG", "CONTROL")
Do While Not rs.EOF
Chan = DDEInitiate("FAXMNG", "TRANSMIT")
DDEExecute Chan, "GoIdle"
faxNum = Chr$(34) & rs![faxNumber] & Chr$(34)
faxName = Chr$(34) & rs![accountName] & Chr$(34)
faxCompany = Chr$(34) & strCompany & Chr$(34)
faxSubject = Chr$(34) & strReportName & Chr$(34)
SendCriteria = faxNum + ",,," + faxName + "," + faxCompany + "," + faxSubject
DDEPoke Chan, "Sendfax", "showSendScreen(""0"")"
DDEPoke Chan, "Sendfax", "fillCoverPage(""0"")"
DDEPoke Chan, "Sendfax", "recipient(" + SendCriteria + ")"
CrystalReport1.SelectionFormula = "{tbl_Account.accountID} = '" & rs![accountID] & "'"
CrystalReport1.Action = 1 **** ' this generates the error "NOT Memory operation
Call PauseSeconds(5)
rs.MoveNext
Loop
Any help would be much aprreciated!!!
Thanks,
Marc