I've got a form that is used to enter specific data. The first box is a number associated with the total record. I already have an autonumber formatted ID column that is unique per record, but the record number is formatted as a number and allows duplicates. The validation range for it is ">=1 and <=9999" and we will be cycling through the 1-9999 number many times in the same table.
Right now, I have the default value for the text box to display =DLast("[tgtnum]","targets")+1 which looks up the last number and adds one so the user shouldn't have to enter in the number (most times). However, once and a great while, a number will get skipped or put in a reverse order when doing data entry (i.e. the next input number should be 100, but they put in 112, then enter 111, making the default value formula above 112, not 113 like it should be). Also, within the same record is a date field and a time field.
I need to somehow make an expression that goes something like this:
for the greatest time (of field time of table1) of the greatest date (of field date of table1), then dmax field number and add 1
Is this a little extreme?
Would a query be easier to build based off of the table, then reference the query in the expression builder for default value?
Thanks in advance to anyone that can help and let me know what else may help.
Right now, I have the default value for the text box to display =DLast("[tgtnum]","targets")+1 which looks up the last number and adds one so the user shouldn't have to enter in the number (most times). However, once and a great while, a number will get skipped or put in a reverse order when doing data entry (i.e. the next input number should be 100, but they put in 112, then enter 111, making the default value formula above 112, not 113 like it should be). Also, within the same record is a date field and a time field.
I need to somehow make an expression that goes something like this:
for the greatest time (of field time of table1) of the greatest date (of field date of table1), then dmax field number and add 1
Is this a little extreme?
Would a query be easier to build based off of the table, then reference the query in the expression builder for default value?
Thanks in advance to anyone that can help and let me know what else may help.