Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How come a binded combobox ValueMember returns a wrong number as RecordNumber?

How come a binded combobox ValueMember returns a wrong number as RecordNumber?

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JUNEYT
    wrote on last edited by
    #1

    Hello, I have experienced a strange problem which I couldn't find a solution. I have a form and one dataset with one table. Whenever I make an entry into this table, I have used Seed value as 100 and auto increment seed number as 5. Therefore the 1st record is getting 100 as recordNumber. I have created another form and placed the same dataset and one combobox which is binded to this table. I have used RecordNumber as ValueMember for the combobox. However when the combobox gets populated with the record, its ValueMember returns 105 instead of 100 (even there is one single record). Whatever I tried to find a solution for the problem, I have had no success. What would cause such problem? Notice: The dataset table gets filled whenever 2nd form gets loaded. Regards,

    What a curious mind needs to discover knowledge is noting else than a pin-hole.

    D 1 Reply Last reply
    0
    • J JUNEYT

      Hello, I have experienced a strange problem which I couldn't find a solution. I have a form and one dataset with one table. Whenever I make an entry into this table, I have used Seed value as 100 and auto increment seed number as 5. Therefore the 1st record is getting 100 as recordNumber. I have created another form and placed the same dataset and one combobox which is binded to this table. I have used RecordNumber as ValueMember for the combobox. However when the combobox gets populated with the record, its ValueMember returns 105 instead of 100 (even there is one single record). Whatever I tried to find a solution for the problem, I have had no success. What would cause such problem? Notice: The dataset table gets filled whenever 2nd form gets loaded. Regards,

      What a curious mind needs to discover knowledge is noting else than a pin-hole.

      D Offline
      D Offline
      DaveAuld
      wrote on last edited by
      #2

      Is it not something to do with the value returned being the next available number for a new record. For example if you add a second record to the table (which would take 105) does the 2nd form now return 110?

      Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

      J 1 Reply Last reply
      0
      • D DaveAuld

        Is it not something to do with the value returned being the next available number for a new record. For example if you add a second record to the table (which would take 105) does the 2nd form now return 110?

        Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

        J Offline
        J Offline
        JUNEYT
        wrote on last edited by
        #3

        I have double checked that whenever I add a new record into dataset gives the correct values as record number (primary key). However, the combobox which I bind to this table doesn't give the right correct values (VALUEMEMBER) when it gets populated from the table. Second row returns 110 which actually must return 105.

        What a curious mind needs to discover knowledge is noting else than a pin-hole.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups