First of all, hello from Thailand as this is my first post on this forum
about myself: I am working for a school here (Deputy headmaster and teacher of accounting) and started to develop an application to manage different aspects of the school life. I am not a programmer but I have been using VBA for Excel quite intensively since excel is supporting vba (Excel 5 -95) I decided a couple of months ago to start using VB6, ADO and ACCESS.
I decided to join this forum because I found different posts and good answers dealing with problems similar to mine.
I have many functions that work perfectly in my application, but I am facing a weird problem
I added one field to a table containing users , u_Active as I don't want to display names of staff who quit and I don't like to erase their names either. The field format is number, integer, the value 1 or 0
this query works:
strSQL = "SELECT [u_User Name] FROM Users ORDER BY u_UserID"
this one triggers the error message
strSQL = "SELECT [u_User Name] FROM Users WHERE u_Active=1 ORDER BY u_UserID"
Now the very weird thing is that the 2nd query works when I run it in ACCESS directly.

|