Antanas_07
Registered User.
- Local time
- Today, 13:13
- Joined
- May 26, 2013
- Messages
- 29
Hi Dx,
I run out of ideas. The SQL statement OK. it works: On Click Event, after breaking point- Debug.Print, Copy to SQL query window, run, and I see the record. But when it comes to Function: nothing happens after click it is just like in your comment:
No Records - No Report a.k.a. no shoes, no shirt, no service. I used other sources how to open Recordset, but the result the same. This is my last "creation":
Public Function MonthlyReport()
Dim dbCustomerComplains_DB_Unlocked As DAO.Database
Dim rstSQLMonthlyRpt As DAO.Recordset
Dim strSQLMonthlyRpt As String
Dim WorkSheetName As String
Dim intHeaderColCount As Integer
Dim intMaxheaderColCount As Integer
Dim intMaxRecordCount As Integer
Dim intWorksheetNum As Integer
Dim intRowPos As Integer
Dim ObjXL As Object
Set dbCustomerComplains_DB_Unlocked = CurrentDb
strSQLMonthlyRpt = "SELECT * FROM tblCCQualityMain WHERE ComplaintOpenDate = #30/05/2013#; "
Set rstSQLMonthlyRpt = dbCustomerComplains_DB_Unlocked.OpenRecordset(strSQLMonthlyRpt, dbOpenSnapshot)
End Function
Everything simplified up to Primary School level.
I Give up.
I run out of ideas. The SQL statement OK. it works: On Click Event, after breaking point- Debug.Print, Copy to SQL query window, run, and I see the record. But when it comes to Function: nothing happens after click it is just like in your comment:
No Records - No Report a.k.a. no shoes, no shirt, no service. I used other sources how to open Recordset, but the result the same. This is my last "creation":
Public Function MonthlyReport()
Dim dbCustomerComplains_DB_Unlocked As DAO.Database
Dim rstSQLMonthlyRpt As DAO.Recordset
Dim strSQLMonthlyRpt As String
Dim WorkSheetName As String
Dim intHeaderColCount As Integer
Dim intMaxheaderColCount As Integer
Dim intMaxRecordCount As Integer
Dim intWorksheetNum As Integer
Dim intRowPos As Integer
Dim ObjXL As Object
Set dbCustomerComplains_DB_Unlocked = CurrentDb
strSQLMonthlyRpt = "SELECT * FROM tblCCQualityMain WHERE ComplaintOpenDate = #30/05/2013#; "
Set rstSQLMonthlyRpt = dbCustomerComplains_DB_Unlocked.OpenRecordset(strSQLMonthlyRpt, dbOpenSnapshot)
End Function
Everything simplified up to Primary School level.
I Give up.