Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

This used to work in A97 but not in A2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike D - 26 Mar 2008 14:51 GMT
We are changing from Access 97 to Access 2007. Most of my forms work with no
problem. I have a couple of minor glitches that I could use some help with.

Main form "NEW_ORDER_ENTRY" with a subform "CUST ID subform FOR NEW ORDER
ENTRY" for looking up parts. When I double click in the "CUSTOMER" field in
the subform the "PART_ID" field from the subform gets copied to the
"MSDATA.PART_ID" field in the main form. Everything works up to this point.
I then want the focus to shift to the "MSDATA.PART_ID" field in the main
form, but it stays in the "CUSTOMER" field in the subform.

The code from A97 was:

Private Sub CUSTOMER_DblClick(Cancel As Integer)
Forms!NEW_ORDER_ENTRY![MSDATA.PART_ID] = Me!PART_ID 'This still works in
A2007
Forms!NEW_ORDER_ENTRY![MSDATA.PART_ID].SetFocus
End Sub
This worked for years

In A2007 I have tried:

Forms!NEW_ORDER_ENTRY![MSDATA.PART_ID] = Me!PART_ID
Forms!NEW_ORDER_ENTRY.SetFocus
Forms!NEW_ORDER_ENTRY![MSDATA.PART_ID].SetFocus

and

Forms!NEW_ORDER_ENTRY![MSDATA.PART_ID] = Me!PART_ID
CUSTOMER.ReleaseFocus
Forms!NEW_ORDER_ENTRY![MSDATA.PART_ID] = Me!PART_ID

and

Forms!NEW_ORDER_ENTRY![MSDATA.PART_ID] = Me!PART_ID
DoCmd.SelectObject acForm, "NEW_ORDER_ENTRY"
Forms!NEW_ORDER_ENTRY.GoToControl [MSDATA.PART_ID]

and a couple of other combinations of thes commands, with various errors
about not finding form, not finding field etc., but the focus always stays
in the subform. I tried putting the code in the lost focus event of the
customer field and tabbed out of it and it still wouldn't go to the main
form.

When we get this working I will move to the next little glitch

Any suggestions would be greatly appreciated.

TIA,
Mike D.
Mike D - 26 Mar 2008 15:32 GMT
I forgot to mention that when I step this through in debug the original code
works ok in A2007.

Mike D.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.