How to generate sequential code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BM LAL
    New Member
    • Oct 2016
    • 3

    How to generate sequential code

    Dear all
    I have create a sequential number in my database i tried
    Dmax but not successful
    my database articles this :
    tblitem = FIELDS: IID[PK] ,category , itemname , sname
    tbldetails[main table]= FIELDS: ID[PK], tdate, item, sname, cod, wt
    frmpurchase = combobox from tblitem And tdate ,wt ,cod From tbldetails
    in tblitem my data is this :
    IID category itemname sname
    1 gold Ring R
    2 gold chain CH
    3 gold babyring BR
    IN tbldetails [MAIN TABLE]
    ID cat. itemname sname cod wt
    1 go. Ring R R01 2.500
    2 go. chain CH CH01 4.000
    3 go. Ring R R02 3.000
    so i want every time i add a item in my frmpurchase ,sequential number auto generate in “cod”
    example: If I add Ring in itemname field box Then auto generate in “COD” field box= R03 , R04 ,R05 , CH02,CH03
    Or If add New itemname Then cod = sname+01
    Pls help me
  • Narender Sagar
    New Member
    • Jul 2011
    • 189

    #2
    Dear BM Lal
    I think your question is not clearly described.
    I presume what you are trying to accomplish is, in your purchase order form, if you add Item ring, then its respective COD value should get auto-populated. Is this the case?

    Comment

    • BM LAL
      New Member
      • Oct 2016
      • 3

      #3
      मित्र नरेंदर सागर
      शीघ्र जबाब के लिए धन्यवाद !
      में अंग्रेजी में थोडा कमजोर हूँ कृपया माफ़ करें !
      आशा हें आप हिंदी को पसंद करेंगे , में चाहता हूँ की purchase फार्म में अगर में tblitem से लिये गये combobox में से कोई item सलेक्ट करूँ , तो tbldetails [जो की मेरी मुख्य टेबल हें ] की "cod" फिल्ड में अंकित उस item के पिछले कोड से +1, purchase फार्म की "cod" बाक्स में प्रदर्शित हों !
      कृपया नोट करें : "cod" इस तरह बनना "sname" +1 ! जेसे Ring का sname "R" हें या की Chain का sname "CH" तो, R01,R02,R03 या CH01,CH02 इसी तरह अगर में कोई नया item सलेक्ट करूँ [जिसका पहले कोई कोड नही बना हें ] तो 01 से स्टार्ट होना ! If you not like hindi reply me pls

      Comment

      • Narender Sagar
        New Member
        • Jul 2011
        • 189

        #4
        Hi BM
        I am ok with Hindi, however, this group is for the benefit of all having similar problem. So person from other part of world may not be able to understand. So I'd request you to use English language only.
        I still does not understand what do you mean by ""cod" फिल्ड में अंकित उस item के पिछले कोड से +1, purchase फार्म की "cod" बाक्स में प्रदर्शित हों !"
        Pl. reply for :
        1. What exactly this COD field meant for?
        2. Why this is required as +1 in purchase order? what is the significance.
        I'm digressing little bit but I think this is required to understand the project.

        Comment

        • BM LAL
          New Member
          • Oct 2016
          • 3

          #5
          Hi Narender
          "COD" Means item code And +1 means increase a number every time if add a item
          itemname means item,s Name
          sname means item,s Short Name [code word]
          cod means sname [code word] And a Running number
          this code required in "sale form" if i enter the code in sale form populate related item,s all data

          Comment

          Working...