M
Mike D
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.
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.