By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,024 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

How to open a form and display the record with the highest value

P: n/a
Hi - I'm trying to figure out how to append a record to a table and
then open a form and display that record. My thought was to use the
autonum primary key field (recordnum) and display the highest value
(which would be the new record), but I'm not sure if that can be done.
Any thought on displaying the record with the highest value in the
recordnum field or another approach would be appreciated.

Thanks!

Jun 22 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 22 Jun 2007 13:47:15 -0700, Coll wrote:
Hi - I'm trying to figure out how to append a record to a table and
then open a form and display that record. My thought was to use the
autonum primary key field (recordnum) and display the highest value
(which would be the new record), but I'm not sure if that can be done.
Any thought on displaying the record with the highest value in the
recordnum field or another approach would be appreciated.

Thanks!
To open a form to the highest RecordNum record, you can use:

DoCmd.OpenForm "FormName", , , "[RecordNum] = " &
DMax("[RecordNum]","TableName")

Note: the above returns the record with the highest value in the
RecordNum field, which may or may not be the last record entered.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jun 22 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.