From: Wes on
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
From: Jeff Boyce on
Wes

Access tables store data rather like "buckets o' data". That is, there's no
inherent (human-perceptible) order. Thus, the "Last" record only makes
sense if YOU have imposed some sort order.

What you YOU mean by "last"?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Wes" <wesjester(a)charter.net> wrote in message
news:UWuon.3104$gF5.947(a)newsfe13.iad...
> 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


From: J_Goddard via AccessMonster.com on
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/Forums.aspx/access-gettingstarted/201003/1

From: Wes on
On 3/18/2010 3:33 PM, Jeff Boyce wrote:
> Wes
>
> Access tables store data rather like "buckets o' data". That is, there's no
> inherent (human-perceptible) order. Thus, the "Last" record only makes
> sense if YOU have imposed some sort order.
>
> What you YOU mean by "last"?
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
I need to ADD a new employee. In the Access manual, looking at the
sequence of events, it indicates that using the OPEN event you can
determine if this is a "new" reocrd. If so, you need to move to the end
of the recordset. Otherwise you will continue to use the first record.

Unfortunately, I am at a big disadvantage. I have several years of
experience using the "big" relational databases, Oracle, Sybase, DB2,
etc., and the programming is completely different. I am trying to learn
to use ACCESS for a small business I am starting. At the moment it is
challenging, but it looks like a really cool facility that has a lot of
power.

Oh, I do have some small amount of VBA experience, but that is from the
EXCEL perspective.

Thanks for the help

Wes
From: Jeff Boyce on
Since Access tables are buckets o' data, you do not need to go to the last
record before adding a new one.

Check Access HELP for "adding a new record".

There's even a property in forms that lets them be used ONLY for entering
new records. Again, Access keeps track of where it gets added, so you don't
have to.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Wes" <wesjester(a)charter.net> wrote in message
news:Zsvon.75277$1n5.56529(a)newsfe04.iad...
> On 3/18/2010 3:33 PM, Jeff Boyce wrote:
>> Wes
>>
>> Access tables store data rather like "buckets o' data". That is, there's
>> no
>> inherent (human-perceptible) order. Thus, the "Last" record only makes
>> sense if YOU have imposed some sort order.
>>
>> What you YOU mean by "last"?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Access MVP
>>
> I need to ADD a new employee. In the Access manual, looking at the
> sequence of events, it indicates that using the OPEN event you can
> determine if this is a "new" reocrd. If so, you need to move to the end
> of the recordset. Otherwise you will continue to use the first record.
>
> Unfortunately, I am at a big disadvantage. I have several years of
> experience using the "big" relational databases, Oracle, Sybase, DB2,
> etc., and the programming is completely different. I am trying to learn
> to use ACCESS for a small business I am starting. At the moment it is
> challenging, but it looks like a really cool facility that has a lot of
> power.
>
> Oh, I do have some small amount of VBA experience, but that is from the
> EXCEL perspective.
>
> Thanks for the help
>
> Wes