Table: (Sales_Site, Area_Codes)
I am trying to list area codes values associated to each sales site across a page (report). Access lists values vertically.
The code below fails to work properly. I don't recieve an error message, but, no data shows up on report. -
Option Compare Database
Option Explicit
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim strAreaCodes As String
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT AC_Area_Codes FROM Area_Codes_tbl WHERE AC_Sales_Site_ID = ' " & Me.AC_Sales_Site_ID & " ';", dbOpenSnapshot)
With rst
Do Until rst.EOF
strAreaCodes = strAreaCodes & !AC_Area_Codes & " "
.MoveNext
Loop
.Close
I am trying to list area codes values associated to each sales site across a page (report). Access lists values vertically.
The code below fails to work properly. I don't recieve an error message, but, no data shows up on report. -
Option Compare Database
Option Explicit
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim strAreaCodes As String
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT AC_Area_Codes FROM Area_Codes_tbl WHERE AC_Sales_Site_ID = ' " & Me.AC_Sales_Site_ID & " ';", dbOpenSnapshot)
With rst
Do Until rst.EOF
strAreaCodes = strAreaCodes & !AC_Area_Codes & " "
.MoveNext
Loop
.Close