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 work orders exist but am having trouble figuring out how to implement it.
I have tried to open a recordset based on an existing query;
dim db as dao.database
dim rs as dao.recordset
set db = Currentdb()
set rs = OpenRecordset("QueryName")
msgbox, rs
I get a "Too few parameters, expected 1" error message. I've tried adding other parameters to the openrecordset command but it still doesn't work.
I have also tried using ADO but am getting an SQL error.
Is there an easier way to do this?
Thanks,
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 work orders exist but am having trouble figuring out how to implement it.
I have tried to open a recordset based on an existing query;
dim db as dao.database
dim rs as dao.recordset
set db = Currentdb()
set rs = OpenRecordset("QueryName")
msgbox, rs
I get a "Too few parameters, expected 1" error message. I've tried adding other parameters to the openrecordset command but it still doesn't work.
I have also tried using ADO but am getting an SQL error.
Is there an easier way to do this?
Thanks,