I am working on a database to administer all the hardware in our company.
Therefor I made a query (which is a join of several tables) to get all the detailed information of the PC's.
In my VB code I wrote some code :
Private Sub ShowPCDetails()
Dim strSQL As String
Dim rs As New ADODB.Recordset
strSQL = "SELECT * FROM qryHW_PC_DetailedSpecs WHERE HW_Label = 'DT#004'
rs.Open strSQL, CurrentProject.Connection, adOpenStatic, adLockReadOnly
This gives an error that EOF or BOF is reached --> a recordcount returns 0 results.
However when I copy my strSQL in the Access-Querybuilder I get 1 record.
When I change my strSQL to tblHW_PC_DetailedSpecs instead of qryHW_PC_DetailedSpecs --> the recordset is filled correctly.
Isn't it possible to use a query for filling a recordset? Or am I missing something else?