Welcome to SPN

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

Sign Up Now!

Which event is triggered?

Discussion in 'Information Technology' started by Gino, Jul 28, 2006.

  1. Gino

    Gino
    Expand Collapse
    Guest

    I needed a very simple listbox with check mark for each record, (which is not
    available within Access), so I created a simple subform with one text field
    and the checkbox, which I use in a way similar to a listbox (i.e. when I
    click on a record in my subform, the main form displays that record).
    This is triggered by a Click_Event on the text field on the subform and it
    works fine.

    However, I need to be able to scroll up and down the subform using the arrow
    keys and have the main form synch with the subform.
    I do not seem to find an event which gets triggered by simply moving to the
    the next or previous record using arrow keys or the navigation buttons at the
    bottom of the subform (I tried OnChange, OnCurrent, BeforeUpdate and
    AfterUpdate etc. etc., but since there is no actual data change nothing
    happens).

    Any idea?
    Thank you very much.

    P.S. I found a clever free utility which displays listboxes with check marks.
    The demo works fine but it requred a bit too much knowledge for me to
    customise it to my requirements. (I can't remember the link to that site but
    I will post it if I find it).


    When I click


    it as a subform on a form using the same data.
     
  2. Loading...


  3. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    There's no event triggered by scrolling in a continuous forms view Form
    (whether or not it is embedded in a Subform Control). The OnCurrent event
    fires when you select a different record, but simply scrolling does not
    select a different record (as you see if you left the RecordSelector active
    in that Form).

    Very likely, you found an ActiveX control that provides the capability you
    want. But, unless it specifically says it is created and tested to be used
    with Access, it may not work -- not nearly all ActiveX controls meet Access'
    requirements.

    Sorry I don't have better news.

    Larry Linson
    Microsoft Access MVP

    "Gino" <Gino@discussions.microsoft.com> wrote in message
    news:CBA65BAB-9419-40E6-ACCC-7C077C63DEDA@microsoft.com...
    >I needed a very simple listbox with check mark for each record, (which is
    >not
    > available within Access), so I created a simple subform with one text
    > field
    > and the checkbox, which I use in a way similar to a listbox (i.e. when I
    > click on a record in my subform, the main form displays that record).
    > This is triggered by a Click_Event on the text field on the subform and it
    > works fine.
    >
    > However, I need to be able to scroll up and down the subform using the
    > arrow
    > keys and have the main form synch with the subform.
    > I do not seem to find an event which gets triggered by simply moving to
    > the
    > the next or previous record using arrow keys or the navigation buttons at
    > the
    > bottom of the subform (I tried OnChange, OnCurrent, BeforeUpdate and
    > AfterUpdate etc. etc., but since there is no actual data change nothing
    > happens).
    >
    > Any idea?
    > Thank you very much.
    >
    > P.S. I found a clever free utility which displays listboxes with check
    > marks.
    > The demo works fine but it requred a bit too much knowledge for me to
    > customise it to my requirements. (I can't remember the link to that site
    > but
    > I will post it if I find it).
    >
    >
    > When I click
    >
    >
    > it as a subform on a form using the same data.
    >
    >
     
  4. strive4peace

    strive4peace
    Expand Collapse
    Guest

    Hi Gino,

    As Larry said, exactly what you want to do cannot be done within Access
    requirements, but there are other ways to get the same functionality:

    1.
    instead of using a listbox, consider using a continuous form
    (I have some really neat code to highlight the active record if you want it)

    2.
    if you want to keep using the listbox, the only way to trap the
    movements is to control them... lock the listbox and force the users to
    scroll using command buttons for (ie:) UP, DOWN, TOP, BOTTOM, and
    possibly also a Search combo...

    Warm Regards,
    Crystal
    *
    :) have an awesome day :)
    *
    MVP Access

    Warm Regards,
    Crystal
    *
    :) have an awesome day :)
    *
    MVP Access



    Larry Linson wrote:
    > There's no event triggered by scrolling in a continuous forms view Form
    > (whether or not it is embedded in a Subform Control). The OnCurrent event
    > fires when you select a different record, but simply scrolling does not
    > select a different record (as you see if you left the RecordSelector active
    > in that Form).
    >
    > Very likely, you found an ActiveX control that provides the capability you
    > want. But, unless it specifically says it is created and tested to be used
    > with Access, it may not work -- not nearly all ActiveX controls meet Access'
    > requirements.
    >
    > Sorry I don't have better news.
    >
    > Larry Linson
    > Microsoft Access MVP
    >
    > "Gino" <Gino@discussions.microsoft.com> wrote in message
    > news:CBA65BAB-9419-40E6-ACCC-7C077C63DEDA@microsoft.com...
    >
    >>I needed a very simple listbox with check mark for each record, (which is
    >>not
    >>available within Access), so I created a simple subform with one text
    >>field
    >>and the checkbox, which I use in a way similar to a listbox (i.e. when I
    >>click on a record in my subform, the main form displays that record).
    >>This is triggered by a Click_Event on the text field on the subform and it
    >>works fine.
    >>
    >>However, I need to be able to scroll up and down the subform using the
    >>arrow
    >>keys and have the main form synch with the subform.
    >>I do not seem to find an event which gets triggered by simply moving to
    >>the
    >>the next or previous record using arrow keys or the navigation buttons at
    >>the
    >>bottom of the subform (I tried OnChange, OnCurrent, BeforeUpdate and
    >>AfterUpdate etc. etc., but since there is no actual data change nothing
    >>happens).
    >>
    >>Any idea?
    >>Thank you very much.
    >>
    >>P.S. I found a clever free utility which displays listboxes with check
    >>marks.
    >>The demo works fine but it requred a bit too much knowledge for me to
    >>customise it to my requirements. (I can't remember the link to that site
    >>but
    >>I will post it if I find it).
    >>
    >>
    >>When I click
    >>
    >>
    >>it as a subform on a form using the same data.
    >>
    >>

    >
    >
    >
     
  5. Gino

    Gino
    Expand Collapse
    Guest

    Thank you Larry for the clarifications. This is what I suspected.

    Regarding the Listbox with check marks" which I found on the web, it is
    actually coded in VBA and works with Access 97 and Access 2000. It does not
    use an activex but some features within ACCWIZ.DLL which comes with a full
    installation of Access.
    The link with history and download is http://www.lebans.com/vb_listbox.htm

    Best regards
    Gino





    "Larry Linson" wrote:

    > There's no event triggered by scrolling in a continuous forms view Form
    > (whether or not it is embedded in a Subform Control). The OnCurrent event
    > fires when you select a different record, but simply scrolling does not
    > select a different record (as you see if you left the RecordSelector active
    > in that Form).
    >
    > Very likely, you found an ActiveX control that provides the capability you
    > want. But, unless it specifically says it is created and tested to be used
    > with Access, it may not work -- not nearly all ActiveX controls meet Access'
    > requirements.
    >
    > Sorry I don't have better news.
    >
    > Larry Linson
    > Microsoft Access MVP
    >
    > "Gino" <Gino@discussions.microsoft.com> wrote in message
    > news:CBA65BAB-9419-40E6-ACCC-7C077C63DEDA@microsoft.com...
    > >I needed a very simple listbox with check mark for each record, (which is
    > >not
    > > available within Access), so I created a simple subform with one text
    > > field
    > > and the checkbox, which I use in a way similar to a listbox (i.e. when I
    > > click on a record in my subform, the main form displays that record).
    > > This is triggered by a Click_Event on the text field on the subform and it
    > > works fine.
    > >
    > > However, I need to be able to scroll up and down the subform using the
    > > arrow
    > > keys and have the main form synch with the subform.
    > > I do not seem to find an event which gets triggered by simply moving to
    > > the
    > > the next or previous record using arrow keys or the navigation buttons at
    > > the
    > > bottom of the subform (I tried OnChange, OnCurrent, BeforeUpdate and
    > > AfterUpdate etc. etc., but since there is no actual data change nothing
    > > happens).
    > >
    > > Any idea?
    > > Thank you very much.
    > >
    > > P.S. I found a clever free utility which displays listboxes with check
    > > marks.
    > > The demo works fine but it requred a bit too much knowledge for me to
    > > customise it to my requirements. (I can't remember the link to that site
    > > but
    > > I will post it if I find it).
    > >
    > >
    > > When I click
    > >
    > >
    > > it as a subform on a form using the same data.
    > >
    > >

    >
    >
    >
     
  6. Gino

    Gino
    Expand Collapse
    Guest

    Thank you Crystal and I do appreciate your offer to let me use your code to
    emulate a list box. Listboxes are easy enough to setup and use in Access but
    not as flexible as I need sometimes...
    Thank you and best regards
    Gino


    "strive4peace" wrote:

    > Hi Gino,
    >
    > As Larry said, exactly what you want to do cannot be done within Access
    > requirements, but there are other ways to get the same functionality:
    >
    > 1.
    > instead of using a listbox, consider using a continuous form
    > (I have some really neat code to highlight the active record if you want it)
    >
    > 2.
    > if you want to keep using the listbox, the only way to trap the
    > movements is to control them... lock the listbox and force the users to
    > scroll using command buttons for (ie:) UP, DOWN, TOP, BOTTOM, and
    > possibly also a Search combo...
    >
    > Warm Regards,
    > Crystal
    > *
    > :) have an awesome day :)
    > *
    > MVP Access
    >
    > Warm Regards,
    > Crystal
    > *
    > :) have an awesome day :)
    > *
    > MVP Access
    >
    >
    >
    > Larry Linson wrote:
    > > There's no event triggered by scrolling in a continuous forms view Form
    > > (whether or not it is embedded in a Subform Control). The OnCurrent event
    > > fires when you select a different record, but simply scrolling does not
    > > select a different record (as you see if you left the RecordSelector active
    > > in that Form).
    > >
    > > Very likely, you found an ActiveX control that provides the capability you
    > > want. But, unless it specifically says it is created and tested to be used
    > > with Access, it may not work -- not nearly all ActiveX controls meet Access'
    > > requirements.
    > >
    > > Sorry I don't have better news.
    > >
    > > Larry Linson
    > > Microsoft Access MVP
    > >
    > > "Gino" <Gino@discussions.microsoft.com> wrote in message
    > > news:CBA65BAB-9419-40E6-ACCC-7C077C63DEDA@microsoft.com...
    > >
    > >>I needed a very simple listbox with check mark for each record, (which is
    > >>not
    > >>available within Access), so I created a simple subform with one text
    > >>field
    > >>and the checkbox, which I use in a way similar to a listbox (i.e. when I
    > >>click on a record in my subform, the main form displays that record).
    > >>This is triggered by a Click_Event on the text field on the subform and it
    > >>works fine.
    > >>
    > >>However, I need to be able to scroll up and down the subform using the
    > >>arrow
    > >>keys and have the main form synch with the subform.
    > >>I do not seem to find an event which gets triggered by simply moving to
    > >>the
    > >>the next or previous record using arrow keys or the navigation buttons at
    > >>the
    > >>bottom of the subform (I tried OnChange, OnCurrent, BeforeUpdate and
    > >>AfterUpdate etc. etc., but since there is no actual data change nothing
    > >>happens).
    > >>
    > >>Any idea?
    > >>Thank you very much.
    > >>
    > >>P.S. I found a clever free utility which displays listboxes with check
    > >>marks.
    > >>The demo works fine but it requred a bit too much knowledge for me to
    > >>customise it to my requirements. (I can't remember the link to that site
    > >>but
    > >>I will post it if I find it).
    > >>
    > >>
    > >>When I click
    > >>
    > >>
    > >>it as a subform on a form using the same data.
    > >>
    > >>

    > >
    > >
    > >

    >
     

Share This Page