Focus Keeps Going to Field in Split Form Datasheet

JamesJoey

Registered User.
Local time
Today, 13:26
Joined
Dec 6, 2010
Messages
642
I'm using a split form with the ID field's On Click to open an editing form to the same record using the following in the On Load of the editing form:

Code:
On Error GoTo Form_Load_Error
       
    If Not IsNull(Me.OpenArgs) Then
    
        With Me.RecordsetClone
            .FindFirst "ReminderID=" & Me.OpenArgs
            If Not .NoMatch Then
                Me.Bookmark = .Bookmark
            End If
        End With
    
    End If
        
    Me.Reminder.SetFocus

   On Error GoTo 0
   Exit Sub

Form_Load_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Load of VBA Document Form_frmRemindersEditEdit"

Problem is I'm requirying the underlying form in the On Close of the editing form using:
Code:
Forms!frmMyForm.Requery
Forms!MyForm!cmdClose.SetFocus

The cursor end sup on the first row's ID field taking away the hyperlink hand even though I'm setting focus to another control.
Seems whenever I requery this way the focus wants to stay on the id field which is the only enabled field on the form.

Any idea how I can retain the hyperlink hand on the ID field after requerying the form in this manner?

I had problems explaining this so if anyone doesn't get it I don't blame them.

James
 
If you're using a Split Form, why are you opening yet another Form to edit a Record? The whole point in using the Split Form is that you can select a Record from the Datasheet part and then edit the Record that appears in the Single Form part.

Linq ;0)>
 
I guess you're right.

I'm defeating the purpose of using a split form.
Might as well go with continuous form if I go that route.
 
Possibly so...the Split Form construct is, while intended for doing exactly what you're trying to do, is very limiting/rigid in what it allows you to do...and another type of Form, such as Continuous, then using an event to open up an editing Form, would probably be better, in the long run.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom