Rabu, 03 Agustus 2011

[MS_AccessPros] Focus on last record in a subform after update of field in unbound main form.

 

Good afternoon!

Main Form is unbound: "Search_HomeInfo"
SubForm: "Search_HomeInfoSub_Listing". Is ordered by date upon opening.

In the after update event of a combobox in the main form's header I would like the focus to go to the last record in the subform. I have tried many combinations and erased all of them. I have put the code for this event below without any of the things I've tried to make this happen.

Thanks :-)
Connie

Private Sub cboAddress_AfterUpdate()
On Error GoTo Proc_Err

'***********************************************************************
'Set the Master/Child Fields based upon the info entered in the header
'***********************************************************************
Me.cboParcelN = ""
Me.tbHomeInfoID = Me.cboAddress.Column(0)

Proc_Exit:
Exit Sub ' or Exit Function

Proc_Err:
MsgBox Err.Description, , _
"ERROR " & Err.Number _
& " cboAddress_AfterUpdate"

Resume Proc_Exit

'if you want to single-step code to find error, CTRL-Break at MsgBox
'then set this to be the next statement by right-clicking on Resume Statement, then press F8 to execute one line at a time
Resume

End Sub

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar