If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
fake Autonumber
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 |
#2
|
|||
|
|||
fake Autonumber
On Tue, 18 May 2010 07:08:03 -0700, Emma
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 |
#3
|
|||
|
|||
fake Autonumber
Unfortunately it doesn't like dmax
"Tom van Stiphout" wrote: On Tue, 18 May 2010 07:08:03 -0700, Emma 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 . |
#4
|
|||
|
|||
fake Autonumber
On Tue, 18 May 2010 07:08:03 -0700, Emma
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] |
#5
|
|||
|
|||
fake Autonumber
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 "Emma" wrote in message ... 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 |
#6
|
|||
|
|||
fake Autonumber
On Tue, 18 May 2010 08:53:01 -0700, Emma
wrote: Oops I was mistaken and John was right. Use the expression builder and you will see what you can and cannot do. Populating this field in the associated form may be your best bet. -Tom. Microsoft Access MVP Unfortunately it doesn't like dmax "Tom van Stiphout" wrote: On Tue, 18 May 2010 07:08:03 -0700, Emma 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 . |
#7
|
|||
|
|||
fake Autonumber
Tom van Stiphout wrote in
: [in expressions as default values] Oops I was mistaken and John was right. Use the expression builder and you will see what you can and cannot do. But doesn't the A2010 table-level data macro change this? You can now have your custom Autonumber run at the engine level using one, right? Looks like a big win to me. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/ |
Thread Tools | |
Display Modes | |
|
|