A family of Microsoft relational database management systems designed for ease of use.
The name of the query must be in quotes.
It's unlikely that you really want to open the query's datasheet, but you didn't say why you want to do that. More likely, you only need to use the DLookup function to check the user id and password. OTOH, if the query is an action query, it would be better to use the Execute method.