Access2003 to 2007 problem

P

Peter Kinsman

A client has moved from Server 2003 to Server 2008 SP2 and Office 2003 to
2007. This has caused a number of problems including the following:
A form created in July 2008 to input actual issues has a subform
sfrmQuantitiesItems listing individual Order Items and another
sfrmQuantitiesIssues displaying available stocks in to enter issues. They
are separate subforms and not subform within subform. A command button on
the main form processes the issues for each item and running Access2003 used
to run the following code to move to the next Item row:
Me.sfrmQuantitiesItems.SetFocus
DoCmd.GoToRecord , , acNext
Running Access2007 it gives the not unfamiliar Error 2105 You can't go to
the specified record.

Most of the other problems I can deal with, although in the re-design
Microsoft have changed a lot of keyboard actions for whatever reason, but
this has got me stuck. Any suggestions please?

Many thanks

Peter Kinsman
 
A

Allen Browne

Perhaps something like this:

With Me.sfrmQuantitiesItems
.SetFocus
If .Form.Dirty Then .Form.Dirty = False
If Not .Form.NewRecord Then
DoCmd.GoToRecord , , acNext
End If
End With

What that does is to
a) explicitly save any edits in progress.
b) check that you're not already at the new record (since there's no next
record after that.)

Include error handling in case (a) fails.
Assumes the subform does permit new records.
 
P

Peter Kinsman

I have finally got this to work, by enabling oune of the controls on the
subform. I will check by trying the database on a PC with Access 2003, but
I do not remember changing anything when we moved to Access 2007.

Do you get confused now that so many of the keyboard shortcuts have been
changed?

I will keep you informed.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top