[AccessD] Combo box Default Value

Mitsules, Mark mitsules_ms at nns.com
Wed Apr 2 13:42:19 CST 2003


Bob,

Thanks for your reply.

To answer the first question, Table1 is static, I'm adding a record to
Table2.  To answer the second question, yes.

But, to answer the third question I'm running into another problem on
providing a default value.  You see, when these "codes" were first conceived
it was assumed (yikes!!!) that there would never be more than 1000
concurrent projects.  So, they began with a simple 3 digit numerical suffix
that followed a letter code (4 characters in all).  When I took over, I
pointed out that the problem with their assumption was that there would be
no historical data once the numbers "rolled over".

I suggested the following... I could not change the first character of the
four character code.  It stands as one of 6 alpha characters.  However, to
work around the 1000 possible combinations limit posed by numerals, I
created a table with every possible 3 digit code using both numbers and
alphas (32*32*32 = 46,656).  Now, since they've started on the number path
they are up to 679, and I would like the next record to default to 680.
But, since the table is obviously ASCII sorted, envisioning code that will
provide a number default until they hit 999, then resuming the ASCII sort
order is proving a little difficult.

Now, to answer the question that will inevitably arise from someone I'm
sure...At our current rate, 46,656 possible combinations will last in excess
of 50 years.  And, everyone who is in a position to make decisions is
willing to live with that caveat.



Mark


-----Original Message-----
From: Bob Gajewski [mailto:bob at renaissancesiding.com] 
Sent: Wednesday, April 02, 2003 1:29 PM
To: 'accessd at databaseadvisors.com'
Subject: RE: [AccessD] Combo box Default Value


Mark

To ensure that only "unused" values are available, set your Table2,Field1 
to "Required=Yes, No Duplicates".

I am unclear on your second question ... when adding a new record to WHICH 
table? If TABLE2, are you saying that you want the next EXISTING value FROM 
TABLE1, FIELD1? Are these numeric values?

Regards,
Bob Gajewski


On Wednesday, April 02, 2003 11:49 AM, Mitsules, Mark 
[SMTP:mitsules_ms at nns.com] wrote:
> Group,
>
> My inability to succinctly state this question correlates to my
inexperience
> with lookup fields.  I will name the objects in my description for my 
> own sanity
>
> I have a table, (Table1) which has an autonumber PK, (Table1, Field0) 
> and another field of values, (Table1, Field1).  I have a second table,
(Table2)
> which has a lookup field (Table2, Field1) to both fields of Table1 but
shows
> only Table1, Field1.  I have a form, (Form1) that is bound to Table2.
 Form1
> contains a combo box control that, when clicked, shows a list of all v
alues
> from Table1, Field1
>
> I would like to achieve two goals.  When adding a new record; To limit
this
> list to values that have not already been utilized, and to show the 
> next available value by default
>
> This seems like it would be a common situation, but I have never had 
> the necessity before now.  Thanks for your suggestions
>
>
>
> Mark
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> 

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list