Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing Two Values from List Box

Status
Not open for further replies.

vepz

Technical User
May 3, 2005
30
US
My application tracks job number and mark number for our production. Each job number could have similar mark numbers. So the only way to get a unique identifier is to consider both fields. I am using a list box and I can store a single field. Is there a way for me to save both values? This would greatly simply my database.

Thanks,
 
So is what you are saying is that your KEY is made up of two fields, but you want to select a single item from a list box and somehow have it populate the two fields? What's in your listbox? What is your table structure and sample data? Is this form used to enter new records of Job Number + Mark? How is your Mark filled in? picked from a box as well? Or typed in? Please supply more info.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
For example, Job 101 may be made up of 2 mark A and 3 mark B. Job 102 may have 1 mark A. Job 103 could have all different mark numbers. I would like to be able to select a record specifying a job number and mark number and then store those values in a different table. Does this help you see what I am trying to accomplish? If not, ask more and I will provide.

Thanks
 
You say you would like to select a record specifying a job number and mark number: what is preventing you from doing that? What is it you are trying to accomplish that you cannot do? I assume you have a table of Job and Mark numbers, no? Why do you want to put these values into a "different table"?

You need to provide for us your table structure(s), some sample data (listed in rows and columns please, not in paragraph form), what you are trying to accomplish, what your form/query/reports are not doing that you want them to do, what you have tried but doesn't work, what is the outcome of what you want........

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Have a look at the Column property of the ListBox object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
What is the best way for me to send my structure and sample data? I tried to attach the file but it would not copy.

Thanks for your interest and help,

Greg
 
Paste it here.
What is the Rowsource of your listbox?

You can get other data from the listbox row by using the column property:

ListBoxName.Column(1)

will be the 2nd visible column (Mark?). Column numbering starts at 0. See if that helps you out.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top