Results 1 to 7 of 7

Thread: Tool Bar question ? (Solved )

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    28

    Tool Bar question ? (Solved )

    Hi,

    I have tool bar with 4 buttons on it, the buttons are TOP, PRIOR, NEXT & BOTTOM to move the record set of the active form and to display the details.

    how can i write the common function for these buttons to work with the active form. The functions are like this..

    for Example.

    Top - When i click, the record set will be moved to first and it
    will be display the details in the active form.


    How can i do this...
    Last edited by muraliambt; May 14th, 2004 at 04:59 AM.
    bye,
    Mursand

  2. #2
    Fanatic Member sridharavijay's Avatar
    Join Date
    Sep 2002
    Location
    http://www.vijaysridhara.in
    Posts
    589
    use the index property of button clicked

    Code:
    Private Sub GetRecord(index as integer)
    
    Select Case ind
          Case 1
          'bla bla bla (move forward)
          Case 2
           'gla gla gla (move backward)
         Case 3
          'ela ela ela (do whatever you want
    End Select
    End Sub

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    28
    Hi,

    I want to put this as common function for all the FORMS in my application. every forms have different record set name. how can i find out which is the active form... etc...
    bye,
    Mursand

  4. #4
    Fanatic Member sridharavijay's Avatar
    Join Date
    Sep 2002
    Location
    http://www.vijaysridhara.in
    Posts
    589
    Is your application a MDI and forms are all child forms or all forms are different forms?
    if it is MDI then you can directly use ActiveForm.recset.
    where recset is declared public RecordSet in that form
    if it is not MDI use Screen.ActiveForm.recset etc..

    Give more details otherwise

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    28
    yah, i am having MDI form and reset is the child forms.

    1. without making the RS as public, can we do operations ( any other method ).

    2. Can i have RS as public & common for all the Forms, because only one form will be displyed at a time.

    3. if i have the RS as public and common for all the form, will it have any impact.

    Thanks.
    bye,
    Mursand

  6. #6
    Fanatic Member sridharavijay's Avatar
    Join Date
    Sep 2002
    Location
    http://www.vijaysridhara.in
    Posts
    589
    You can have one RS defined public in a module. However
    1. Only one query could be executed at a time..
    2. 2nd query could be executed only if firstly opned RS is closed and opened for second query.
    3. Only one form has to show the results at a time
    HTH

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    28
    Thanks, any other way of doing this.
    bye,
    Mursand

Posting Permissions

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



Click Here to Expand Forum to Full Width