I need to get the count value back from this sql select statement from my code:
"SELECT count(AssetOwner) " & _
"FROM AssetOwner WHERE AssetOwner = '" & NewAssetOwner.Value & "'"
However, I can't figure out the correct command or syntax to get it. I've tried DoCmd.RunSQL(the above sql statement) and it tells me that "RunSQL requires a SQL statement". I've tried everything I can think of. Please help!
Thank you!
"SELECT count(AssetOwner) " & _
"FROM AssetOwner WHERE AssetOwner = '" & NewAssetOwner.Value & "'"
However, I can't figure out the correct command or syntax to get it. I've tried DoCmd.RunSQL(the above sql statement) and it tells me that "RunSQL requires a SQL statement". I've tried everything I can think of. Please help!
Thank you!