Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Mr. Steele: Further problem about ODERBY

Discussion in 'Information Technology' started by Martin \(Martin Lee\), Jul 28, 2006.

  1. Martin \(Martin Lee\)

    Martin \(Martin Lee\)
    Expand Collapse
    Guest

    First, Mr.Doug Steele, thank you very much for your amazing VBA.

    Second, I want to make your method into more generally using. The VBA you
    provide is fit for textbox, however in my FORM,I have combobox also. I want
    to make your VBA available also to FORM's combo box, how ?

    ( I have tried to change the vba "textbox" into "combobox", but can't work.)

    Thanks!

    Martin Lee


    ----------------------------------------------------------------------------
    It sounds, then, like you want something like the following in your button's
    Click event:

    If TypeOf Screen.PreviousControl Is TextBox Then
    Me.OrderBy = Screen.PreviousControl.ControlSource
    Me.OrderByOn = True
    End If

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    > >> >> I have a FORM which contains a lot of textboxes (each textbox belong
    > >> >> to

    > > a
    > >> >> field).
    > >> >>
    > >> >> I want to make a button on this FORM : firstly I would place the

    mouse
    > > to
    > >> >> anyone of the textbox, and then I click this button --- what I want
    > >> >> is,
    > >> > when
    > >> >> I click this button, the FORM will index by THIS textbox's field.
    > >> >>
    > >> >> How should the VBA of this BUTTTON be?
    > >> >>
    > >> >> Thank you.
    > >> >>
    > >> >>
    > >> >>
    > >> >> Martin Lee
    > >> >>
     
  2. Loading...


Share This Page