Public Function fncLog() As Boolean CurrentDb.Execute "insert into tblLog(QueryName, [Last Run]) " & _ "select '" & CurrentObjectName & "'," & Format(Now(), "\#mm\/dd\/yyyy hh\:nn\:ss\#") fncLog = True End Function That worked thanks