The images don't go all the way to the bottom of the properties list, but
I doubt that any of those unseen properties would lead to the problem that
you're seeing.
The subform has a Form_BeforeInsert procedure, which can block you from
doing anything that would move you from the first record to other records
if there is any type of data addition being done; but, with the AllowEdits
and etc. properties being set to No, I cannot imagine a situation where
this event procedure should be run. However, if there is any code in the
subform's form that would try to add a new record when you try to move to
a different record (for example, the Form_Current event procedure), that
might block navigation.
Also, is there any code in the Exit or LostFocus or GotFocus or Enter
event of any control in the subform itself? The behavior that you're
seeing suggests that an error occurring during a code operation, or the
action of code steps themselves, is cancelling the attempt to "leave" a
control or a record.
I do suggest that you move the code in the main form (setting the
RecordSource of the subform) from the Form_Open event to the Form_Load
event. I find inconsistent behavior if I try to use the Open event to
manipulate controls and their properties (including subform objects).
I suggest that you put a breakpoint on the first code step in all the VBA
code in the subform's form (form and control event procedures), and see
which code procedure is "triggered" when you try to navigate to a
different record. That should assist in subsequent debugging to find out
what is blocking the navigation action.
--
Ken Snell
<MS ACCESS MVP>
(PeteCresswell) said:
Per Ken Snell (MVP):
I don't know of a specific property that would cause this behavior. How
is
the form being opened -- manually? by code? by macro? If by code or
macro,
show us the code line or the macro arguments.
It's a subform in a form that is being opened by code:
-----------------------------------------------------
Private Sub cmdAccount_Click()
debugStackPush Me.Name & ": cmdAccount_Click"
On Error GoTo cmdAccount_Click_err
' PURPOSE: To allow user to open up the trade functions screen
Dim myUserID As String
DoCmd.Hourglass True
myUserID = CurrentUserGet()
If Not IsTrader(myUserID) Then
DoCmd.Hourglass False
MsgBox "You need to contact the SFIM administrator and get on
the list of people allowed to trade.", vbExclamation, "User '" &
myUserID & "' Not Allowed To Trade."
Else
Me.Visible = False
With DoCmd
.OpenForm "frmSecurity"
.Hourglass False
End With
End If
cmdAccount_Click_xit:
DebugStackPop
On Error Resume Next
Exit Sub
cmdAccount_Click_err:
BugAlert True, ""
Resume cmdAccount_Click_xit
End Sub
----------------------------------------------------
What are the properties that you have set for the form?
That's my prime suspicion.... that I've fat-fingered something...
but I'm at a loss as to what.
Rather than enumerate them laboriously here, how about a couple
of screen snaps: one of the parent form's props and one of the
subform's props?
Two for each bc I can't fit the whole props list on my
home PC's monitor.
Parent:
http://tinyurl.com/37d9fe
http://tinyurl.com/2wx33l
Subform:
http://tinyurl.com/3bnhgn
http://tinyurl.com/3dy9r8
.RecordSource not populated in the child bc it gets
assigned to the query below in Form_Open().
What is the form's RecordSource query's SQL
statement?
Dirt simple: just selecting rows from a work table where there's
a hit on a PK called "SecurityID":
-----------------------------------------------
SELECT ttblSecurity_PaymentSchedule.*
FROM ttblSecurity_PaymentSchedule
WHERE
(((ttblSecurity_PaymentSchedule.SecurityID)=[forms]![frmSecurity]![txtSecurityID]))
ORDER BY ttblSecurity_PaymentSchedule.PaymentDate DESC;