Obtain maximum value of previously entered numerical data

wdrspens

Registered User.
Local time
Today, 04:40
Joined
Jun 19, 2008
Messages
63
I have a simple database with 4 tables, one of which, called "Calorie", has relatively few entries and fields but does have an autonumbered ID field called "CalID" set as its primary key. An additonal record is added to the Calorie table on about a weekly basis.
That CalID field is related to a field called "CalsID" in another table called "Diary" on a one to many relationship. Data is entered into the Diary table on at least 10 times a day and possibly many more times. The entry in the "CalsID" field is always the latest and highest numbered entry in the CalID field, and I would like that number to be entered automatically by default each time a new record is added to the Diary Table.
I use a form to enter data into the Diary Table and have tried to specify the default value of the CalsID field as =Max([Calorie]![CalID]) but that does not enter any value at all.
I am not a programmer and cannot easily use VB or any other programming language, but can use the Properties of a Field with reasonable success.
At the moment I enter the number into the CalsID field using <Ctrl> + Apostrophe shortcut, but would prefer not to enter anything relying on the value to be entered automatically.
Does anyone have any suggestions?
Thanks
 
Thank you vewry much. That seems to be working properly. Much appreciated.
 

Users who are viewing this thread

Back
Top Bottom