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
|
|||
|
|||
consecutive default values in table?
I'm fixing an existing database. The primary key is a numerical field, consecutive, and the owners would like the next number in line to auto-populate in that field when they enter a new record.
I'm pretty sure this is achieved via default value, but haven't been able to find the proper expression? Tried this: =DMax("[FieldName]","TableName")+1 ....and was returned an error message. Other things that might make a difference: previously created records have since been deleted (when sold) so the list is not complete anymore. Also I'm using MSOffice Professional 2000. Any help in creating the default value expression to just tell the form "this number is the same as the previous record plus 1" would be SO APPRECIATED! |
#2
|
|||
|
|||
consecutive default values in table?
AFAIK, it's not possible to set use DMax in setting a field's DefaultValue
in a table. You can, of course, do this when using a form to update the table, though, so it shouldn't matter, since you should never be updating tables directly. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "beejsnyder" wrote in message ... I'm fixing an existing database. The primary key is a numerical field, consecutive, and the owners would like the next number in line to auto-populate in that field when they enter a new record. I'm pretty sure this is achieved via default value, but haven't been able to find the proper expression? Tried this: =DMax("[FieldName]","TableName")+1 ...and was returned an error message. Other things that might make a difference: previously created records have since been deleted (when sold) so the list is not complete anymore. Also I'm using MSOffice Professional 2000. Any help in creating the default value expression to just tell the form "this number is the same as the previous record plus 1" would be SO APPRECIATED! |
#3
|
|||
|
|||
consecutive default values in table?
Mr. Steele, you are quite literally my hero!!! Until my next crisis...
Thanks again!! beejsnyder "Douglas J. Steele" wrote: AFAIK, it's not possible to set use DMax in setting a field's DefaultValue in a table. You can, of course, do this when using a form to update the table, though, so it shouldn't matter, since you should never be updating tables directly. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "beejsnyder" wrote in message ... I'm fixing an existing database. The primary key is a numerical field, consecutive, and the owners would like the next number in line to auto-populate in that field when they enter a new record. I'm pretty sure this is achieved via default value, but haven't been able to find the proper expression? Tried this: =DMax("[FieldName]","TableName")+1 ...and was returned an error message. Other things that might make a difference: previously created records have since been deleted (when sold) so the list is not complete anymore. Also I'm using MSOffice Professional 2000. Any help in creating the default value expression to just tell the form "this number is the same as the previous record plus 1" would be SO APPRECIATED! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
default values | Glenn Causey | New Users | 3 | July 19th, 2004 12:21 PM |
Default placement for data values in Charts | Ellen | Powerpoint | 2 | July 14th, 2004 03:56 PM |
STORE multiple values from a lookup table | beller | Database Design | 2 | June 16th, 2004 04:16 AM |
resize table from A4 size to A5 | ims | New Users | 3 | June 9th, 2004 01:05 AM |
Change Default Pivot Table Summary | Larry Kayser | Worksheet Functions | 1 | March 24th, 2004 09:54 PM |