juanito01 respondió:
Te abro un pequeña puerta... Dim mibd As DAO.Database Dim miRs As DAO.Recordset Set mibd = CurrentDb() Set miRs = mibd.OpenRecordset("select max(cod_factura) from facturas") MsgBox "Siguiente numero de factura: " & miRs.Fields(0)+1 Set miRs = Nothing...