Sorry, I had skimmed this post quickly and missed the fact that you'd
discovered the same resolution I proposed.
As to why you can't get it to work immediately after opening the form, it's
because Access is "slightly" multi-threaded and the form is being opened
asynchronously. You're issuing your command before the form recordset is
populated, so the "move to last record" command is useless at this point.
It would be an unreliable way of doing it, but if you put in some kind of a
delay loop after your OpenForm command, you'd probably find that the "move
last" would take effect normally if you delayed long enough.
A third way of doing this, which is less common, but useful in some
circumstances, would be to open the form by creating a new instance of it
instead of through OpenForm. I'm just writing this off the top of my head,
but the code would look something like this:
Private Sub Edit_Data_Click()
Dim f As [Form_Product Details Ver1]
'need square brackets because name has spaces
Set f = New [Form_Product Details Ver1]
DoCmd.GoToRecord acDataForm, f.Name, , acLast
End Sub
I *believe* that when you do it this way, the Set statement only returns
after the form is fully loaded. I might be wrong in that, though, in which
case the code gets a bit more complicated, and I won't confuse you with
facts unless you need them. :)
(To give you an outline, though, you either have to issue an f.Requery or
similar statement, which is redundant, but forces the form to fully
populate, or you have to use event sinking in order to catch the Form_Load
event outside of the form itself...possibly useful, but if you can do it in
the regular Form_Load event, then there's no reason to do it this way.)
Rob
> Hi Bob,
>
[quoted text clipped - 25 lines]
> I am reasonably competent in VBA for Excel but have a great deal to learn
> about Access.
OssieMac - 31 Dec 2007 00:00 GMT
Hi Rob,
Thanks for the added suggestion. However, it didn' twork but not to worry
because I have modified my code now to use the On load event and it works so
I don't intend to spend any more time on it. Prefer to get on with the rest
of the project.

Signature
Regards,
OssieMac
> Sorry, I had skimmed this post quickly and missed the fact that you'd
> discovered the same resolution I proposed.
[quoted text clipped - 62 lines]
> > I am reasonably competent in VBA for Excel but have a great deal to learn
> > about Access.