Skip to Content
author's profile photo Former Member
Former Member

Problem trapping event in a matrix SBO 2004

Hi

I am trying to trap when the lost focus event in a matrix, so if the cell is empty I want to put the focus back into that cell and call a formatted search

I can't seem to get the cursor to go back to the original cell. Can anyone help please ?

Regards Andy

    Case et_LOST_FOCUS:
    ' check if parish code is empty in posts matrix
    If pVal.formuid = "CONTACTS" And pVal.ItemUID = "228" And pVal.ColUID = "u_dpcode" And pVal.Before_Action = False Then
      Set oform = SBO_Application.Forms(formuid)
      Set omatrix = oform.Items("228").Specific
      If Trim(omatrix.Columns("u_dpcode").Cells(pVal.Row).Specific.String) = "" Then
        omatrix.Columns("u_dpcode").Cells.Item(pVal.Row).Click ct_Regular
        ' SBO_Application.SendKeys ("+{F2}")
      End If
      Set omatrix = Nothing
      Set oform = Nothing
    End If

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 21, 2005 at 04:39 PM

    Hi Paul,

    Have you debuged the app and ensure if this line is executed?

    omatrix.Columns("u_dpcode").Cells.Item(pVal.Row).Click ct_Regular

    Which version is it?

    in 2005, the Validate and Before_Action = true event is rised too, and you could use it to set the BubbleEvent to false(In 2004 it is not rised).

    Regards,

    Ibai Peñ

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.