Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Record Selector buttons for multiple subforms (Access 2000)

    I have multiple subforms in a single form, each on its own page of a multi-page. Each subform has its own seperate records. Each seperate recordset has the identical number of records. I want to create a set of buttons on the forn that will allow the user to move through the records of each subform together. Right now, the user has to to each page on the form and move the record to the next record. I want one button to move all the subforms to the next record simultaneously. I tried the following with the following error. Configuration_Subform is the name of one of the subforms.

    Me.Configuration_Subform.SetFocus
    DoCmd.FindNext


    Run Time Error '2143'

    You didn't specify search criteria with a FindRecord action.


    Thanks
    Mike

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

    Re: Record Selector buttons for multiple subforms (Access 2000)

    FindNext, as its name indicates, is meant as the equivalent of the Find Next button in the Edit | Find dialog, not as a way to go to the next record.

    If you want all the subforms to behave as one, perhaps you shouldn't use separate subforms. Instead, put controls bound to fields from one record source in the various tab pages.

  3. #3
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record Selector buttons for multiple subforms (Access 2000)

    I got it to work by using the following code.

    Me.Configuration_Subform.Form.Recordset.MoveNext
    Me.Dimensions_Engines_Subform.Form.Recordset.MoveN ext
    Me.Dimensions_Equipment_Subform.Form.Recordset.Mov eNext
    Me.Dimensions_Fuselage_Subform.Form.Recordset.Move Next
    Me.Dimensions_Landing_Gear_Subform.Form.Recordset. MoveNext
    Me.Dimensions_Main_Rotor_Subform.Form.Recordset.Mo veNext
    Me.Dimensions_Tail_Subform.Form.Recordset.MoveNext
    Me.Dimensions_Tail_Rotor_Subform.Form.Recordset.Mo veNext
    Me.Dimensions_Wing_Subform.Form.Recordset.MoveNext
    Me.Performance_Subform.Form.Recordset.MoveNext
    Me.Weights_Equipment_Subform.Form.Recordset.MoveNe xt
    Me.Weights_General_Subform.Form.Recordset.MoveNext
    Me.Weights_Propulsion_Subform.Form.Recordset.MoveN ext
    Me.Weights_Structure_Subform.Form.Recordset.MoveNe xt

    Mike

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

    Re: Record Selector buttons for multiple subforms (Access 2000)

    A lot of work for something that would be done automatically without any code if you didn't use all those subforms.

  5. #5
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record Selector buttons for multiple subforms (Access 2000)

    I have to use all those subforms. The record source this form uses comes from a query. I have over 400 fields that need to be queried. That is too many for a single query. I broke them up into logical groups in seperate smaller queries. I need the results to be viewed in a single form for ease of use. So I need seperate subforms so that I can utilize the different queries in different recordsources. However, I still need the seperate subforms to behave as one. I need this all to happen without the user being the wiser. I know this is a crap load of work. I know what your next question is. No, I can't limit the number of fields. I must be able to search all 400 fields. This is the entire puropose of the database. This database is to catalog all the different parameters of military aircraft. The main function of the database is to be able to produce parametric curves and equations of any combination of parameters the user chooses. Yippee. Fun for me.

    Thanks for all your help.
    I believe I can now just barely see the light at the end of the tunnel.

    Mike

  6. #6
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record Selector buttons for multiple subforms (Access 2000)

    I agree with Hans, however if you had a primary key linking all those subforms to the same piece of equipment and requeried the subforms after the main form changed focus (on current), wouldn't you achieve the same result?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  7. #7
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record Selector buttons for multiple subforms (Access 2000)

    Yes, that should work. However, I have such an enormous amount of data that the queries take a considerable amout of time to run. I forgot to let you know that I work for the Navy, so we have the most out of date computers in existance. Only the best for the US Navy. Secondly, I now have it working. On to the next problem. Problem 7896 of 345678.

    Got to keep moving.

    I think I can! I think I can! I think I can!

    Thanks
    Mike

  8. #8
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record Selector buttons for multiple subforms (Access 2000)

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>I'm in the Marine Corps...I get your hand-me-downs <img src=/S/puke.gif border=0 alt=puke width=60 height=15>
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

Posting Permissions

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