473,385 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB 6: Store the value from combo box

have a combobox with 2 columns. First column has Company name and second column has an integer value next to it. For example,

A Company 10
B Company 20
C Company 30
D Company 40

The combo box should display Company name and store the integer value next to it in the database field. Please help.

Thanks.
Feb 18 '08 #1
1 1581
jamesd0142
469 256MB
Would i be right in saying; the data is just one continuos line of text in each item of the combo box?

if this is true then you will need to use the mid / substring functions to get the integer values.

I dont think this is a good idea to have two values in the same combobox if this is the case...
cant you use two comboboxes? -or-
1 combobox and a text box to display the integer value for the selected company?

James
Feb 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Newbie | last post by:
Hi all, A have several forms with unbound combo boxes, the combo boxes are used to filter the data in the forms. What I would want is that my application stores the most recent settings of these...
2
by: Terry Bickle | last post by:
Please forgive me for using the wrong term here or there. I'm an old Excel 4 macro guy who didn't convert to VB and I'm tinkering with an Access 2000 DB. I'm sure there is a simple Access 101...
1
by: Rich | last post by:
I have a form with a combo box on it. The combo box's source is a access lookup table with two columns, EmployeeName & EmployeeNumber. I want to display the EmployeeName from the dropdown but...
8
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". ...
1
by: meganrobertson22 | last post by:
Hi Everyone- I am trying to use a simple macro to set the value of a combo box on a form, and I can't get it to work. I have a macro with 2 actions: OpenForm and SetValue. I can open my form,...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: Dan Keeley | last post by:
Hi I'm trying to create a custom combo box so i can display a nice text name but return the actual key value for the database. So i have this class ( At the bottom of this post ) How do i...
32
by: tfurubay | last post by:
Hi, I am setting up a database and would like a combo box on a form to store two values. for example, there's a ID and a Description. I can easily get the combo box to show both the ID and the...
0
by: Man4ish | last post by:
Hi, I am using multiple combo list (2 here). I want to store the selected item by these two combo boxes in an array list to check that same value should not be selected by two. This way i am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.