The big problem behind this is that I want to fill in one of the fields in a form with a default value. The current expression in data-->default value looks like this
[race number] is a FK to the main table's primary key.
=(1+Nz(DMax("ID","[race tasks]","[race number] =" & "[race number]")))
So for each [race number], every time I add a task I should get a new high number for the task ID
But this gives me duplicates. For the life of me I cannot figure out why it's giving me duplicates (only one user on this database at this time)
I add a record, start editing and Access pops up its automatic new record addition, with a duplicate value
It occurred to me that the way Access automatically pops up a new row without me asking might be causing some difficulty, so One thing I tried was In my form design I disable 'allow additions' to false and put an 'add a new record button' on the page.
In the action for the button I have to, guess what, allow additions.
please, please help.
Thanks for your time.
[race number] is a FK to the main table's primary key.
=(1+Nz(DMax("ID","[race tasks]","[race number] =" & "[race number]")))
So for each [race number], every time I add a task I should get a new high number for the task ID
But this gives me duplicates. For the life of me I cannot figure out why it's giving me duplicates (only one user on this database at this time)
I add a record, start editing and Access pops up its automatic new record addition, with a duplicate value
It occurred to me that the way Access automatically pops up a new row without me asking might be causing some difficulty, so One thing I tried was In my form design I disable 'allow additions' to false and put an 'add a new record button' on the page.
In the action for the button I have to, guess what, allow additions.
please, please help.
Thanks for your time.