F
Fernando Morais
Hi,
i was trying to do a query that is inserting values on a DB, and one of
the field should be the result from a query using MAX on antoher DB.
Something like this:
INSERT INTO tblSNew ( idEquipamento, idCliente, idSWDescrição )
VALUES ((SELECT MAX(idEquip) FROM tblHW), (Forms!frmAddPC!txtCli),
(Forms!frmAddPC!txtPC));
But this gives and undefined error in access, i've tried changing the
(SELECT MAX(idEquip) FROM tblHW) to (MAX(tblHW.idEquip)) and it says i
can't use aggregated functions.
And i'm stuck here, is it any mistake on that? Is that possible, or i
need to do it in another way?
Thanks.
i was trying to do a query that is inserting values on a DB, and one of
the field should be the result from a query using MAX on antoher DB.
Something like this:
INSERT INTO tblSNew ( idEquipamento, idCliente, idSWDescrição )
VALUES ((SELECT MAX(idEquip) FROM tblHW), (Forms!frmAddPC!txtCli),
(Forms!frmAddPC!txtPC));
But this gives and undefined error in access, i've tried changing the
(SELECT MAX(idEquip) FROM tblHW) to (MAX(tblHW.idEquip)) and it says i
can't use aggregated functions.
And i'm stuck here, is it any mistake on that? Is that possible, or i
need to do it in another way?
Thanks.