G
Guest
Hi,
Everytime I run the following function, my screen will display the query
result which I do not need. The function result is to be use by another
query.
Function LastID() As Long
'qryProduct is a saved query
Dim lngSourceID As Long
Set rst = CurrentDb.OpenRecordset("Select * From qryProduct where ProductID
= " & lngSourceID & ";")
If Not rst.EOF Then LastID = rst!ProductID
End Function
Can someone tell me how to suppress the screen display of this query result?
Thanks in advance!
Scott
Everytime I run the following function, my screen will display the query
result which I do not need. The function result is to be use by another
query.
Function LastID() As Long
'qryProduct is a saved query
Dim lngSourceID As Long
Set rst = CurrentDb.OpenRecordset("Select * From qryProduct where ProductID
= " & lngSourceID & ";")
If Not rst.EOF Then LastID = rst!ProductID
End Function
Can someone tell me how to suppress the screen display of this query result?
Thanks in advance!
Scott