This would be a function in a module. Something like:
Public Function NextVal(byval strSeqName as string) as long
dim sq as string,db as database, rs as dao.recordset
'Assuming fields named with 'SequenceName' as value field
sq = "SELECT " & strSeqName & " FROM tblSequence WHERE Recid = 1"
'(Recid should be an Integer field, make it PrimaryKey, and you put a 1 as it's value, put 1 in Validation Rule, so nobody can add records--this is a single-record table)
'(For simplicity we wont' lock the table--but if this were live production--you would open the recset with locking options)
Set rs = db.openrecordset(sq,dbopendynaset)
rs.edit
rs(strseqname) = rs(strseqname) + 1
NextVal = rs(strseqname)
rs.update
End Function
Then have a table called, say, tblDummy--with just one record, you can do as above with Recid, integer, validation rule = 1, etc, etc. This is like the Oracle Dual table.
Then In the query, you do:
Select nextval("SomeSequenceName") as Thesequence from tblDummy
Then if the above is a source for a recordset or a sub-select, it will return only one record, which will be the value of the next sequence for that 'sequence'.
--Jim