Commas in List Boxes in Tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need the following values to be available in a list box in a table:

$1,000,000
$2,000,000
$3,000,000
$1,000,000/$2,000,000
etc . . .

Even if I put the values in quotes, the strings are being separated in the
list by the commas, so the list will show "$1" as the first item, "000" for
the second, and so on.

Can anywone share how I can resolve this? I appreciate any help! Thanks.
 
I just tried this and it worked. The field in the table was defined as Text
data type and the table was used as the Row Source of a listbox on a form.
What are the Row Source Type and Row Source properties of your listbox? Was
is the data type of the field in the table?

I also tried using them as a Value List in the listbox and they worked ok
for a listbox on a form and a listbox as a Lookup in a table. The Row Source
Type has to be set to Value List to do this. Here is a copy of the Row
Source I used in the table Lookup listbox.

"$1,000,000";"$2,000,000";"$3,000,000";"$1,000,000/$2,000,000"
 
Hi Wayne!

You were right, I'm not sure how I did it, but the combo box Row source was
the $ amounts I listed with no quotes surrounding them, so the commas
separated the items in the list like I described.

How do I base the combo box on the field in the table? I tried various
combinations of things for the control source, row source type and row source
on the combo box and I'm not getting the right results.

my table name is tblQuotes
my field name is tblLiabilityLimit
my combo box is tblLiabilityLimit

I appreciate your help very much!
 
I usually base the Row Source on a query to add sorting. In this case, set
Row Source Type to Table/Query and the Row Source to

SELECT tblLiabilityLimit FROM tblQuotes ORDER BY tblLiabilityLimit;

You can also used a stored query, if so, just enter the name of the query as
it appears in the database window.

The number of fields you list are the number of columns available to the
listbox or combo box. This will appear as listed in the query from left to
right. On the Format tab of the box's Properties dialog you can set the
Column Count (number of columns), Column Widths (setting a column to 0 width
will hide that column), and Column Heads (displays the field name at the top
of the column). On the Data tab you can set Row Source Type and Row Source,
Control Source (the field in the form's Record Source where you want to
store the selection), and Bound Column (the column who's value will be
stored in the Control Source field).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top