From: Emma on
Hi I already have an autonumber in my table and would like to have a second
one just for certain items. Can I use the following somewhere in the table's
definition:
dmax("FieldName", "TableName") + 1

From: Tom van Stiphout on
On Tue, 18 May 2010 07:08:03 -0700, Emma
<Emma(a)discussions.microsoft.com> wrote:

Try setting that as the Default Value for the field.

-Tom.
Microsoft Access MVP


>Hi I already have an autonumber in my table and would like to have a second
>one just for certain items. Can I use the following somewhere in the table's
>definition:
>dmax("FieldName", "TableName") + 1
From: Emma on
Unfortunately it doesn't like dmax

"Tom van Stiphout" wrote:

> On Tue, 18 May 2010 07:08:03 -0700, Emma
> <Emma(a)discussions.microsoft.com> wrote:
>
> Try setting that as the Default Value for the field.
>
> -Tom.
> Microsoft Access MVP
>
>
> >Hi I already have an autonumber in my table and would like to have a second
> >one just for certain items. Can I use the following somewhere in the table's
> >definition:
> >dmax("FieldName", "TableName") + 1
> .
>
From: John W. Vinson on
On Tue, 18 May 2010 07:08:03 -0700, Emma <Emma(a)discussions.microsoft.com>
wrote:

>Hi I already have an autonumber in my table and would like to have a second
>one just for certain items. Can I use the following somewhere in the table's
>definition:
>dmax("FieldName", "TableName") + 1

No. A Table cannot contain expressions, and its default value cannot reference
any other field in the table. You'll need to do this on a Form.
--

John W. Vinson [MVP]
From: Steve on
Your question hints at your tables are not designed correctly. Take a look
at the design of your tables and mayne you will find you don't need a fake
autonumber. If you like, posy your tables here and we will advise you.

Steve
santus(a)penn.com


"Emma" <Emma(a)discussions.microsoft.com> wrote in message
news:4468DD7A-F570-4831-91B6-3FA5B516EA2F(a)microsoft.com...
> Hi I already have an autonumber in my table and would like to have a
> second
> one just for certain items. Can I use the following somewhere in the
> table's
> definition:
> dmax("FieldName", "TableName") + 1
>


 |  Next  |  Last
Pages: 1 2
Prev: Access Report
Next: Adding a field to a subquery