P
Perry
Hi:
This is really strange, but I've run out of places to
look for the problem.
I have a Form and Subform, with a KeyPress handler on the
subform. When C is pressed code is executed, but for some
reason it calls the keypress code a second time after
finishing the first execution??
Select case snippet:
--------------------
Select Case strKey
Case "C"
If lngSelectDeposit <> 0 Then Exit Sub
'Open form to select and set lngSelectDeposit
DoCmd.OpenForm "selectCHQdeposit", , , "[deposited=0", ,
acDialog
If lngSelectDeposit = 0 Then Exit Sub
For x = 1 To lngNumRows
If Nz(Me!DepositID, 0) = 0 Then
Me!DepositID = lngSelectDeposit
Me!LastEdit = Now()
Me!LastEditBy = GetUserLong()
End If
If x < lngNumRows Then DoCmd.GoToRecord , , acNext
Next
DoEvents
Me.Requery
---------------
So the code executes correctly (first time), then drops
back into the above code. When I stepped through the
procedure it didn't step anywhere, just popped back in
again??
Any ideas?
Thanks,
Perry
This is really strange, but I've run out of places to
look for the problem.
I have a Form and Subform, with a KeyPress handler on the
subform. When C is pressed code is executed, but for some
reason it calls the keypress code a second time after
finishing the first execution??
Select case snippet:
--------------------
Select Case strKey
Case "C"
If lngSelectDeposit <> 0 Then Exit Sub
'Open form to select and set lngSelectDeposit
DoCmd.OpenForm "selectCHQdeposit", , , "[deposited=0", ,
acDialog
If lngSelectDeposit = 0 Then Exit Sub
For x = 1 To lngNumRows
If Nz(Me!DepositID, 0) = 0 Then
Me!DepositID = lngSelectDeposit
Me!LastEdit = Now()
Me!LastEditBy = GetUserLong()
End If
If x < lngNumRows Then DoCmd.GoToRecord , , acNext
Next
DoEvents
Me.Requery
---------------
So the code executes correctly (first time), then drops
back into the above code. When I stepped through the
procedure it didn't step anywhere, just popped back in
again??
Any ideas?
Thanks,
Perry