I created a form where there is a series number. What I like to do is to show the last used number in the series on a text box beside this.
How can I do this.
Thank you.
I created a form where there is a series number. What I like to do is to show the last used number in the series on a text box beside this.
How can I do this.
Thank you.
Dear Mr. PBadly,
Tried to use DMax or even DLast but still no luck, it always show an error message of "The expression you entered has a function containing the wrong number of arguments.
in the text box I wrote:
=DMax([Transmittal No]) or
=DLast([transmittal No])
both have the same error message.
Thanks in advance for your input
There are two types of aggregate functions:
SQL Aggregates - Sum, Avg, Count, etc
Access Domain Aggregates - DSum, DAvg, DCount, etc
Domain aggregates have 3 arguments.
DMax("fieldname", "tablename", "optional where condition")
Access Help has more info on domain aggregates.
Use domain aggregate if you want Max value of all records in table. Use in queries, textbox, code.
Use SQL aggregate if you want Max value of records in the form's recordset. Use in queries or textbox.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Dear June07,There are two types of aggregate functions:
SQL Aggregates - Sum, Avg, Count, etc
Access Domain Aggregates - DSum, DAvg, DCount, etc
Domain aggregates have 3 arguments.
DMax("fieldname", "tablename", "optional where condition")
Access Help has more info on domain aggregates.
Use domain aggregate if you want Max value of all records in table. Use in queries, textbox, code.
Use SQL aggregate if you want Max value of records in the form's recordset. Use in queries or textbox.
thank you for the explanation. It really helps.
all done and working. cheers.