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. Database & SysAdmin
  3. Database
  4. combo box issue

combo box issue

Scheduled Pinned Locked Moved Database
databaseperformancehelpquestion
2 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.
  • S Offline
    S Offline
    scorp_scorp
    wrote on last edited by
    #1

    Dear All, Usage: access 2007, VBA I have 2 comboboxes, cbo1 and cbo2 , cbo1 is loaded with numbers from the database, and cbo2 is loaded with text from the database. dim cb1 as double dim cb2 as string cb1 = CDbl(me.cbo1.value) ' i chossed: 800524 cb2 = CStr (me.cbo2.value) ' i choosed: Hello World msgbox cb1 msgbox cb2 Result : 800524 Result : 4 where 4 represent the location of the "Hello world" , fourth element in the cb2, while i need to get the text :( I can get wat i need from this result (using dataset , and query) but it cost code lines and memory resource, shouldent .Value returns the exact value that is selected ???

    0 will always beats the 1.

    J 1 Reply Last reply
    0
    • S scorp_scorp

      Dear All, Usage: access 2007, VBA I have 2 comboboxes, cbo1 and cbo2 , cbo1 is loaded with numbers from the database, and cbo2 is loaded with text from the database. dim cb1 as double dim cb2 as string cb1 = CDbl(me.cbo1.value) ' i chossed: 800524 cb2 = CStr (me.cbo2.value) ' i choosed: Hello World msgbox cb1 msgbox cb2 Result : 800524 Result : 4 where 4 represent the location of the "Hello world" , fourth element in the cb2, while i need to get the text :( I can get wat i need from this result (using dataset , and query) but it cost code lines and memory resource, shouldent .Value returns the exact value that is selected ???

      0 will always beats the 1.

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #2

      cb2 = CStr (me.cbo2.text)

      List of common misconceptions

      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