Textbox to array to combobox

  • Thread starter Thread starter Grizz
  • Start date Start date
G

Grizz

My Pricetbl has five (number) fields (as double and general format each).
How can I write an array to place them in a combobox?, but instead of showing
the number, show the name. I do not want the names to be passed, but the
number of the selected.


Scenerio:
As it's setup in the table

ItemTbl
widgetID
Widget number
widget2 number
widget3 number
widget4 number
widget5 number

LoadTbl
TruckID
LoadRate number
LoadMileage number


EquationTbl done with query
EquationID
LoadID
NewNumber number (from the selected combobox worked inside th formula)
EnteredNumber1 number
EneterdNumber2 number
FinalEntered number

Tbl4 done with query
LoadTbl *, EquationTbl *


My first form has the five number textboxes to enter a decimal number, each,
for the day.

My second form has two number textboxes to enter a decimal number, each, for
as many locations for the day.

Third form will have the combobox I mentioned, to do a (equation,
calculation, or formula result) with out doing all five at the same time.
This way the final result of the selected item will be displayed in a text
box. But after I enter a number in two more textboxes then click a button to
start the equation. Below that will be another texbox, that the I will enter
a decimal number. When I click save button, this will save all the answers
from the formula and the second form into a seperate table, as many times per
location.

So I have three tables, one for each form. This way I don't clear out the
fields on the first form or table until the next day as those numbers are no
longer needed. I clear the second table or form when I am at a different
locations during the day. I do not need this stored if I didn't have any
calculations at that location from the third form. I will have them stored
when I do my final number in a box. I don't need to save every bit of
information, through my calculations, or my database would overpopulate with
irrelevent numbers, until I need to save

Basically this is like a calculator. I tried to keep it as simple as I
could, but hopefully you can see the idea that is going on.

Thank You
 
Hi Grizz,

RowSource -->
SELECT widgetID, widgetName
FROM widgets
ORDER BY widgetName

ColumnCount --> 2
ColumnWidths --> 0;2
ListWidth --> 2.2 (sum of ColumnWidths + 0.2" for scrollbar)

the trick is in setting zero for the first column width. By default,
the first column is the bound column, so the number will be stored but
the name will show

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
Thank You Crystal for responding back

Isn't the SELECT statement going to show just the numbers of the five widget
names? Or is it going to show me the field names and the number and I am
looking to hard into this.

If it does grab both should i rewrite it as
SELECT widgetID, widget, widget1, widget2
FROM Itemtbl

Thank You
 
Hi Grizz,

ColumnWidths --> 0;2

"the trick is in setting zero for the first column width."

by doing this, the first column will not show -- the second column will
be displayed to the user, but the value from the first column is what
will be stored by default

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
Back
Top