I have this following code snippet in Access 2007.
Here, "qry_Resource_I D_By_Name" is defined as
The problem is that
is failing as
and
are ivaluated as "True". However,
shows "Resource ID".
I am clueless. Any help please?
Code:
strTempQuery = "qry_Resource_ID_By_Name"
Set dbs = CurrentDb()
Set qdf = dbs.QueryDefs(strTempQuery)
qdf.Parameters(0) = lstResourceProposed.Column(0, cnt)
qdf.Parameters(0) = lstResourceProposed.Column(1, cnt)
Set rst = qdf.OpenRecordset()
If Not rst.BOF And Not rst.EOF And rst.Fields.Count = 1 Then
iProposedResourceID = rst.Fields("Resource ID")
End If
Code:
SELECT Resource_ID AS [Resource ID] FROM tbl_Resource_Master WHERE Resource_Last_Name+Resource_First_Name=[?];
Code:
If Not rst.BOF And Not rst.EOF And rst.Fields.Count = 1 Then
Code:
rst.BOF
Code:
rst.EOF
Code:
rst.Fields(0).Name
I am clueless. Any help please?
Comment