robsworld78
Registered User.
- Local time
- Yesterday, 21:44
- Joined
- May 31, 2011
- Messages
- 99
Does this look right?
I have this on current event on NightCountEnterReturnsSubform
Private Sub Form_Current()
Forms!NightCount.NightCountInventorySubform.Form.SetFocus
DoCmd.FindRecord Me.InventoryID
End Sub
When the form loads it gives an error, debug and hover over setfocus line which is highlighted and it says ID=881
Hover over next row it says ID=881
Close debugger, tab to next record, same error, open debugger hover over and it says ID=882.
The ID is always changing so its reading correctly but not actually selecting that record, it doesn't like my setfocus, what else could I use?
I have this on current event on NightCountEnterReturnsSubform
Private Sub Form_Current()
Forms!NightCount.NightCountInventorySubform.Form.SetFocus
DoCmd.FindRecord Me.InventoryID
End Sub
When the form loads it gives an error, debug and hover over setfocus line which is highlighted and it says ID=881
Hover over next row it says ID=881
Close debugger, tab to next record, same error, open debugger hover over and it says ID=882.
The ID is always changing so its reading correctly but not actually selecting that record, it doesn't like my setfocus, what else could I use?