Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Location
    Nanded, India
    Posts
    397

    Unanswered: Display Current Record Number On Subform While Navigation

    Hi,

    I am working on a small project for a clinic.

    I have a header form and a subform with one to many relationtionship set on FileNo field. The Subform table have another field called RecID with Autonumber datatype. The Subform is set as single form to show single record each time (Not continues form mode)

    In subform, I need to place a text box that counts and displays current record number related record in header form

    Let us say if header form currently displays patient's Fileno A3201 and this patient visited 6 times to clinic. So when moving thru records in subform, the textbox should display record 1, 2, 3 and so on..

    I can display it "total records 6 for this patient" once his file is on screen. But I need to display current record number of concern patient while navigation .

    How can I do that ?

    Please extend your help..
    With kind regards,

    Ashfaque

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    how have you defined the relationship between the parent and child form?

    Not to sure I can rememeber offhand, but I seem to think if you select the sub report, and look at the properties you can specify what the link field is

    alternatively delete the sub report from the parent report, then reinsert it, makling sure you specify the value.

    aniother technique you could use is to pull the value form the parent form

    eg
    <myvalue> = forms!<myparentformname>!<mycontrolORVariablename>
    OR
    push it ie send it form the parent to the child form
    forms!<mychildformname>!<mycontrolname> = <mycontrolORVariablename>

    in either of these two events you will need to wrap some error handling mechanism around to handle if the sub form isnt pen, or soem other unsepcified error occurs.

    HTH
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Apr 2003
    Location
    Alabama, USA
    Posts
    154
    http://AccessDB.Info

    You live and learn. At any rate, you live. - Douglas Adams

  4. #4
    Join Date
    Jan 2005
    Location
    Nanded, India
    Posts
    397
    Thanks healdem...

    And thanks to Cosmos75. You gave me good link. Now I can play in my code and I hope it would be solved.

    With kind regards,
    Ashfaque

Posting Permissions

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