openrecordet problem with query

B

branko

Can anyone help with this procedure?
When I put some table name in strTable I get many records
and columns but when I put query name in strTable I got
nothing. Col and Row Count = 0

Dim intColCount as Integer
Dim intRowCount as Integer
Dim strTable As String
Dim rstTemp As Recordset
strTable = "qryName" ' "tblName"
Set rstTemp = CurrentDb.OpenRecordset(strTable,
dbOpenSnapshot)
intColCount = rstTemp.Fields.Count
rstTemp.MoveLast
intRowCount = rstTemp.RecordCount
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top