Hi All,
I'm new at VBA. I'm trying to do an insert statement from a view into an access table. The problem is that I need to use some passed variables from a subroutine as a criteria in the WHERE clause. Could you please show me how to implement it?
ex:
strsql = "insert into tbl_SelectAuths (Authno, authdate, [time], keyword) select authno, authdate, authtime, bno from v_auth_fax where authdate = ad and authtime between ft and tt. The problem is ad, ft, tt, bno is the passing variables from a subroutine. All of the variables were passed (with value) but somehow the data won't insert. No error raised. We tried to qualiying the variables, but it won't insert.
Thank you!
I'm new at VBA. I'm trying to do an insert statement from a view into an access table. The problem is that I need to use some passed variables from a subroutine as a criteria in the WHERE clause. Could you please show me how to implement it?
ex:
strsql = "insert into tbl_SelectAuths (Authno, authdate, [time], keyword) select authno, authdate, authtime, bno from v_auth_fax where authdate = ad and authtime between ft and tt. The problem is ad, ft, tt, bno is the passing variables from a subroutine. All of the variables were passed (with value) but somehow the data won't insert. No error raised. We tried to qualiying the variables, but it won't insert.
Thank you!