Need to Display a Field +1 on a Form

cybrooksy

New member
Local time
Today, 15:44
Joined
Nov 24, 2009
Messages
8
Guys,

This is a simple one, I'm sure.

I have a form that needs to display the Maximum Value of a Field in a related table, +1.

I have tried DMAX in the default value of the field in question, but I'm either putting it in the wrong place, using the wrong syntax or using the wrong function.

Any help would be appreciated.

Cybrooks
 
In the default value of the field I put:

=DMAX([field],
) + 1

Thanks for looking at this.

Cybrooksy
 
Code:
=[COLOR=Red][B]Nz([/B][/COLOR]DMAX([COLOR=Red][B]"[/B][/COLOR][field][B][COLOR=Red]"[/COLOR][/B], [COLOR=Red][B]"[/B][/COLOR]table[COLOR=Red][B]"[/B][/COLOR])[COLOR=Red][B], 0)[/B][/COLOR] + 1
 
Thanks,

I tried:

=Nz(DMax("[Key]","ORD in Primary Key"),0)+1

in the Default Value of the field.

Switching to form view I just get "#Error" in the field, not the next number.

Cybrooksy
 
Data Type is Text as it has a suffix of 'ORD' followed by number.

cybrooksy
 

Users who are viewing this thread

Back
Top Bottom