View Single Post
  #3  
Old March 18th, 2010, 07:42 PM posted to microsoft.public.access.gettingstarted
J_Goddard via AccessMonster.com
external usenet poster
 
Posts: 221
Default Finding Last Record

Hi -

If you are using this in a form, try using DoCmd.GoToRecord ,,acLast.

This will go to the last record in whatever dataset the form is using as its
RecordSource,
e.g. tblEmployee

If you are using the form to add new data, use acNew instead of acLast.



John



Wes wrote:
Being very new to Access I am struggling a bit, so need some assistance.
I have an ACCESS 2000 manual and keep trying to figure it out, but I
am just a bit ACCESS deprived.

I have a form that will be used for New Employees. When I OPEN the
form, (OPEN event, I think,) I need to get to the last record in my
table. I have tried

DoCmd.GoToRecord acDataTable, "SalesAssociate", acLast

but get an error saying the table is not open.

I have tried several other things, but nothing seems to work.

I know I have it wrong, but can't figure it out.

Any suggestions

Thanks

Wes


--
John Goddard
Ottawa, ON Canada
jrgoddard at cyberus dot ca

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/201003/1