S
SAP2
Hello,
I have this little function that I am trying to get a value for:
Function SignName() As String
Dim dbs As Database
Dim rst As DAO.Recordset
Dim strName As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qrySignature", dbOpenDynaset)
strName = rst!SName
End Function
When I call the function it is empty, but when I use:
Function SignName() As String
Dim dbs As Database
Dim rst As DAO.Recordset
Dim strName As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qrySignature", dbOpenDynaset)
MsgBox rst!SName
End Function
and call the function it works.
The SQL for the query is:
SELECT tbl_User.Name AS SName
FROM tbl_User
WHERE (((tbl_User.UserName)=fOSUserName()));
I have this little function that I am trying to get a value for:
Function SignName() As String
Dim dbs As Database
Dim rst As DAO.Recordset
Dim strName As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qrySignature", dbOpenDynaset)
strName = rst!SName
End Function
When I call the function it is empty, but when I use:
Function SignName() As String
Dim dbs As Database
Dim rst As DAO.Recordset
Dim strName As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qrySignature", dbOpenDynaset)
MsgBox rst!SName
End Function
and call the function it works.
The SQL for the query is:
SELECT tbl_User.Name AS SName
FROM tbl_User
WHERE (((tbl_User.UserName)=fOSUserName()));