Doing a calculation on a form

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?
 

Users who are viewing this thread

Back
Top Bottom