How can I customize the "default value" in a field

  • Thread starter Thread starter Vidal Castillo
  • Start date Start date
V

Vidal Castillo

I am an acces beginner, so please be patient.
I have a field in a TABLE called "IvoiceNr"; I want its
"DEFAULT VALUE" to be the number of the higher number typed
in the column. e.g.: My higher value in the column was 135,
so the "DEFAULT VALUE" is 136.

What expression do I have to write down, in the "default
value field" , so that I can get this value?

Note: In the column may be fields without value, I just
want the higher number in the column.

Thanks
 
You can't do that in a table. You can, however, do it in a form, by entering
an expression such as the following as the Default Value property of a text
box ...

=DMax("[TestNumber]","tblTest")+1

.... where "TestNumber" is the name of the field, and "tblTest" is the name
of the table. See "DMax Function" in the help file for details.
 
Thanks for the information, it really helped me. Have a
nice day

-----Original Message-----
You can't do that in a table. You can, however, do it in a form, by entering
an expression such as the following as the Default Value property of a text
box ...

=DMax("[TestNumber]","tblTest")+1

.... where "TestNumber" is the name of the field, and "tblTest" is the name
of the table. See "DMax Function" in the help file for details.

--
Brendan Reynolds (MVP)


I am an acces beginner, so please be patient.
I have a field in a TABLE called "IvoiceNr"; I want its
"DEFAULT VALUE" to be the number of the higher number typed
in the column. e.g.: My higher value in the column was 135,
so the "DEFAULT VALUE" is 136.

What expression do I have to write down, in the "default
value field" , so that I can get this value?

Note: In the column may be fields without value, I just
want the higher number in the column.

Thanks


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top