How I can keep items in order

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • creative1
    Contributor
    • Sep 2007
    • 274

    How I can keep items in order

    hi guys,
    I got another query here. I am using two tables for my invoice
    1......... Inv_total
    this table has details of transection ... here tran_id is PK
    2.........Inv Details
    This table has details of items purchased from vendor. I don't have any PK here

    Everything is working fine here
    I print invoice after i save transection in database. Then i extract data from database and print the innvoice. It works fines all the way it should.
    I have one issue.
    When i print invoice, item are not in the same order as they were on interface. I want to see them insame order they appear in list in the interface. What is right thing to do now?
    should i print invice before I save it?
    or
    should I add a serial no in the table inv_details?
    if I go with this one. Can long interger support this? should I make it auto increase? should I set it in serial no and restart it for every new transection?

    What is right approach?



    P.S. I am use Access2003 as dB and VB6 at front.
    Kind Regards
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    What do you mean by item are not in the same order as they were on interface ?

    Which interface ?

    Comment

    • mafaisal
      New Member
      • Sep 2007
      • 142

      #3
      Hello,
      I think Better way is save slno in detail table, in Printing query like order by slno
      then to get same order entered

      Faisal


      Originally posted by creative1
      hi guys,
      I got another query here. I am using two tables for my invoice
      1......... Inv_total
      this table has details of transection ... here tran_id is PK
      2.........Inv Details
      This table has details of items purchased from vendor. I don't have any PK here

      Everything is working fine here
      I print invoice after i save transection in database. Then i extract data from database and print the innvoice. It works fines all the way it should.
      I have one issue.
      When i print invoice, item are not in the same order as they were on interface. I want to see them insame order they appear in list in the interface. What is right thing to do now?
      should i print invice before I save it?
      or
      should I add a serial no in the table inv_details?
      if I go with this one. Can long interger support this? should I make it auto increase? should I set it in serial no and restart it for every new transection?

      What is right approach?



      P.S. I am use Access2003 as dB and VB6 at front.
      Kind Regards

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        It is always better if you have a SlNo Column in Details..
        And while Printing or Retreiving data, You can always Order BY Slno...


        REgards
        Veena

        Comment

        • creative1
          Contributor
          • Sep 2007
          • 274

          #5
          Thank guys
          should I restart Sr.# every time I enter a new transection information or keep it on going serial wise.

          Comment

          • QVeen72
            Recognized Expert Top Contributor
            • Oct 2006
            • 1445

            #6
            Hi,

            In Detail, You need to Retart SlNo for evry trans_id..
            Like, Trans_Id + SlNo Should be unique..
            This will be helpfull especially in Reports if you need to print Slno..

            Regards
            Veena

            Comment

            • creative1
              Contributor
              • Sep 2007
              • 274

              #7
              Thanks,
              I had a bunch of ideas I thought its always good to have an expert's idea. I got it I'll implementing it now.
              thanks you all for your help.
              Regards

              Comment

              Working...