I have an SQL Pass Through Query that I need to be able to changing the search parameter dynamically (this is Access 2000). I can not use the Access 97 code (does not work ) and the examples from Access 2000 also result in the same error (user-defined type not defined) Here is the SQL Passthrough code for the query named qry_ZONE:
SELECT tbl_SUBNETS.SUBNET
FROM tbl_SUBNETS
WHERE (((tbl_SUBNETS.ZONE)='ZONE 19'));
I want to change the WHERE clause to say ZONE 18, or ZONE 17. I know the code for this should be short. Can anyone tell me what the code would be, including variables for Access 2000. Again, for Access 97 I could have used some like Dim db As Database. Dim qdef As QueryDef. db = Currentdb and so on and son on. This doesn't work. ANy ideas. Thank you in advance.
Anthony
SELECT tbl_SUBNETS.SUBNET
FROM tbl_SUBNETS
WHERE (((tbl_SUBNETS.ZONE)='ZONE 19'));
I want to change the WHERE clause to say ZONE 18, or ZONE 17. I know the code for this should be short. Can anyone tell me what the code would be, including variables for Access 2000. Again, for Access 97 I could have used some like Dim db As Database. Dim qdef As QueryDef. db = Currentdb and so on and son on. This doesn't work. ANy ideas. Thank you in advance.
Anthony