Combo box automatic number propogation

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

I would like to have a combo box automatically generate the numbers 1-110
rather than having to type them in.

Is this possible?

Thank you for your help and suggestions!
 
I assume you are talking about adding new records to a table.
This add records to Tbl1 with numbering starting a value entered into box1
of the form for a total of records entered into box2.

Create a table named CountNumber with field CountNUM containing number from 0
(zero) to your maximum spread.
INSERT INTO Tbl1 ( field1 )
SELECT [Forms]![YourForm]![box1]+[CountNUM] AS field1
FROM CountNumber
WHERE ((([Forms]![YourForm]![box1]+[CountNUM])<=[Forms]![YourForm]![box2]));
 
Mary said:
I would like to have a combo box automatically generate the numbers 1-110
rather than having to type them in.


That kind of thing is another reason why you should have a
utility table with one field. The values in the table would
be the numbers from 1 to 1000 or more. Then you can use a
simle query as the combo box's row source.

Most likely. you will find several more uses for this
utility table.
 
I said Table, not "field". I also find it useful to have a
one row table, with some fields for application wide values
that I do not want to embed in my code.

We sure are talking in the abstract about something when I
have no idea what you are trying to accomplish.
 
Back
Top