With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.
Note that the GetName at the end is trying to put return just the ClientName field for the recordset rsResult. But I'm not sure how to get it to do that. This doesn't work - it tells me that the item isn't in the collection. I've also tried GetName = rsResult.ClientName, but that doesn't work either, because it's not an object.
Private Function GetName (Client) Dim strSQL as String Dim rsResult as Recordset Dim DB as Database strSQL = "SELECT TOP 1 ClientID, ClientName, FROM tblClients " & _ "WHERE (ClientID = " & Client & ");" Set DB = CurrentDb Set rsResult = DB.OpenRecordset(strSQL) GetName = rsResult([ClientName]) End Function