Rather frustrating problem here:
With the code of a command button below, I wan't a subform to appear with a new record in focus:
CODE
Private Sub cmdUNB_Click()
Me.subfrmNAW.Form.RecordSource = "l_calls_unbound"
Me.subfrmNAW.Form.visible = True
Me.subfrmNAW.Form.DataEntry = True
Me.unbID = DMax("ID", "l_calls_unbound")
End Sub
Me.subfrmNAW.Form.RecordSource = "l_calls_unbound"
Me.subfrmNAW.Form.visible = True
Me.subfrmNAW.Form.DataEntry = True
Me.unbID = DMax("ID", "l_calls_unbound")
End Sub
But it just keeps showing the first record it finds in it's recordsource. Instead of the DataEntry = True option I also tried a using sub in the subform, with: DoCmd.GoToRecord , , acNewRec.
But nothing.
For testing I added a command button on the subform, and tried both commands after the subform was 'opened'. Now both commands work as they should, moving it to a new record.
What am I missing?