Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PreviousControl (2002)

    Hi.

    I understand the use of Screen.PreviousControl to return the control that had the focus last and was wondering.....

    If i want to reference the actual control on a subform from the parent form is this possible? Or do i have to do this from within the subform itself?

    The situation is I want a button on a form that will sort the coloumn that was last selected in the subform.
    Thanks,

    pmatz

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: PreviousControl (2002)

    Hi M

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PreviousControl (2002)

    Hi Hans.

    Thats great! Clever stuff there, no need for the 'PreviousControl' after all. So the active control on the subform stays 'active' on the subform even when the focus is on the parent. Makes sense, as when i tab in/out of the subform Access remembers where i was.

    Good start to the day! Cheers [img]/forums/images/smilies/smile.gif[/img]

    Just found I can use Me.subformMine.Form.ActiveControl as well [img]/forums/images/smilies/smile.gif[/img]

    On the subject of sorting records, i would like the code attached to just one neat button, which i was (and may still have to) have the caption change depending on whether the records have been sorted ASC or DESC....

    ...i was trying to find a way of having the bitmap change rather than the text. I know i can use

    cmdButton.Picture to set a graphic from windows, but how can i get the values of the soret button graphics within access? It just gives me (bitmap) as the Picture!
    Thanks,

    pmatz

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: PreviousControl (2002)

    I don't know how to get at the built-in pictures in code, but you could use the bitmaps from the attached zip file. Make sure to store the bitmaps in a location accessible to all users.
    Attached Files Attached Files

  5. #5
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PreviousControl (2002)

    Thanks again, thats real cool of you.

    [img]/forums/images/smilies/biggrin.gif[/img]
    Thanks,

    pmatz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •