Straylight
New member
- Local time
- Yesterday, 18:24
- Joined
- Feb 21, 2008
- Messages
- 7
I have the following code...
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim rs As DAO.Recordset
Dim x As Integer
Set db = CurrentDb
Set qdf = db.QueryDefs("CNoteFullPage")
strSQL = "Select * FROM CNotes WHERE CID = " & Form_PacketClients!RecordID & " ORDER BY NDate DESC, NTime DESC"
qdf.SQL = strSQL
Set rs = qdf.OpenRecordset
rs.MoveFirst
For x = 1 To 12
Form_C_Notes_Page_View.NDate(x) = rs.Fields("Ndate")
Next x
The form has 12 different groups, Ndate1, Ndate2, Ndate3 etc, along with various other control text boxes.
The above does not work Ndate1 by itself works, Ndate(x) does not. Seems simple enough but I am having a problem finding a solution any ideas?
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim rs As DAO.Recordset
Dim x As Integer
Set db = CurrentDb
Set qdf = db.QueryDefs("CNoteFullPage")
strSQL = "Select * FROM CNotes WHERE CID = " & Form_PacketClients!RecordID & " ORDER BY NDate DESC, NTime DESC"
qdf.SQL = strSQL
Set rs = qdf.OpenRecordset
rs.MoveFirst
For x = 1 To 12
Form_C_Notes_Page_View.NDate(x) = rs.Fields("Ndate")
Next x
The form has 12 different groups, Ndate1, Ndate2, Ndate3 etc, along with various other control text boxes.
The above does not work Ndate1 by itself works, Ndate(x) does not. Seems simple enough but I am having a problem finding a solution any ideas?