Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Unanswered: Subforms ... Access 2000

    Hi all.

    Drawing a blank here ... I have a subform of contacts. I add a new contact thru a second form (adds the record to the table the subform is bound to ...) I requery and the record is there ... Drawing the blank on having the subform "point" (or be on ) the just created record. How????

    Points of interest:

    - Subform RecordSource is a query on the table with an ORDER BY (so records not in sequential order of entry)

    - I have the index # ( internal contact reference #) to query by

    Just trying to translate finding the record into a record # to do a GoToRecord command on ...

    Any thoughts?

    Thanks!

    - Mike
    Back to Access ... ADO is not the way to go for speed ...

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Wouldn't a new record be the last record for that dataset?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    Wouldn't a new record be the last record for that dataset?
    Um ... Nope. Just tested it. Went to the last in the list (by order) not to the record created. As to your question: not necessarily - depends on how the records are ordered. If the criteria puts it at the bottom, or the top, or somewhere in the middle. In my case it's in the middle.
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Here's an example:

    Code:
    Name                    Phone                     Ndx
    
    All, Diana               999-9999                1
    Alma, Ron              999-9999                 2
    Buday, Tomas         888-8888                3
    Dummy,Test           777-7777                 5
    Franklin, Ben           666-6666                 4
    I just added the test dummy ... Now, how to get the subform to be on that record????
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Dec 2002
    Posts
    97

    CurrentRecord

    What if you force the updated record to be the current record and then pass that value in the recordset to the subform?

    Depending what you're trying to do another option might be to create a function that takes the values in the main form and passes them either as an array or as a direct one to one relation after update.

    frmSub!txtBox = frmMain!txtBox

    These are just ideas...haven't tested them so take it for what it's worth...me just trying to think through the problem.

    Hope it helps.

    Chris

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Thanks for the thought but no. As I stated, the record has been added to the table the subform is bound to. The subform has been requeried. The record is visible. The record IS NOT selected tho...
    Back to Access ... ADO is not the way to go for speed ...

  7. #7
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    This is a poser ... No ideas Ted????
    Back to Access ... ADO is not the way to go for speed ...

  8. #8
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Got something ... I did a brute force count using the same ordering query to get the requisite record # ... Then a simple GoToRecord command did the trick.
    Back to Access ... ADO is not the way to go for speed ...

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Pull it into a variable when you first load the form, then increment it, save some cycles.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  10. #10
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    Pull it into a variable when you first load the form, then increment it, save some cycles.
    GOTCHA! That won't work either because with updating the contact the relative position in the list can change ... The dirty little secret is that the ordering is on the Last name, First ... There is not any real performance hit because we're talking about less than 20 contacts ... If there was say hundreds or thousands I would be concerned...
    Back to Access ... ADO is not the way to go for speed ...

  11. #11
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    ... And here's another way: (works great too!)

    Code:
      Dim rs As Object
    
      Set rs = Me.ContactList.Form.RecordsetClone
      rs.FindFirst "[Ndx] = " & ParameterTxt.Value
      Me.ContactList.Form.Bookmark = rs.Bookmark
      Set rs = Nothing
    Back to Access ... ADO is not the way to go for speed ...

  12. #12
    Join Date
    Jan 2005
    Posts
    1
    Please disregard my previous posting if you already viewed it. I put this in place of it because I already figured it out.

    Thanks anyways!
    Last edited by mldavis; 01-19-05 at 14:56.

  13. #13
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by mldavis
    I am new to this forum and cannot find out how to create a new thread so I am replying to one that is somewhat related.

    I have found numerous posts on this site and others related to subreports in Access, but none of them tell me how to create subreports.

    Can someone help? (I have an Excel workbook with 160 sheets that all link together to create a report. We are trying to move this report into Reports and Subreports in Access.)

    Thank you.
    A subreport (or for that matter a subform) is a report (or form) that is contained within another form or report ... Simple. You create them the same way as a regular form or report.
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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