Steve,
You have my permission to kick me!!!
I was trying to use:
intCount = rs.RecordCount
Then testing for a recordcount of 0
That was coming up with all the records.
I went back and re-read one of your earlier posts and changed this to:
intCount = 0
While Not rs.EOF...
Thanks for all your help, Steve. Looks like it will have to be a mystery. I copied the SQL from the immediate window as you suggested and it performed properly.
Bill
Steve,
It still ignores the AND clause. I tried reversing the order of the test also (placing [CompBy] before the [Equip_ID] but it still did the same thing. It's returning all 8 records as opposed to running the Query by itself which returns 5 records.
I'm sorry to be pestering you so...
Thanks PHV and Steve,
This has cleared up the error and I am getting records returned now. However the:
"And (([tblWorkOrders].[ClosedBy]) Is Null));" part does not seem to be working.
It's returning all the records instead of just the ones where [ClosedBy] Is Null.
This query does work...
Steve,
Thanks so much for your help. I think I understand what this code is doing but I may have screwed up...
>>the conrol is populated with a numeric value:
Actually, I am using a text field because the Equipment ID's are alpha-numeric. Could this be what is causing the code to crash for...
Here is the SQL from the query and the code I am trying to use:
SELECT tblWorkOrders.WorkOrder_ID, tblWorkOrders.Equip_ID, tblWorkOrders.ClosedBy
FROM tblEquipData INNER JOIN tblWorkOrders ON tblEquipData.Equip_ID = tblWorkOrders.Equip_ID
WHERE (((tblWorkOrders.WorkOrder_ID)=True) AND...
I am using access 2000.
I have a form that displays equipment data from an equipment data table. On the form is a command button that will display any open work orders (from a separate table) existing for a particular piece of equipment.
I want to be able to disable the command button if no...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.