Question : In ACCESS (2007) - Is there a way to set a feilds defualt value to a combination of 2 fields

This would be a key field (non unique) for the table. For example, say field 5 has a name of "SUB_ACCT_NO_PAS" and field 7 has a name of SUB_PHONE_NO_PAS, I would like field 12 to be equal to the value of SUB_ACCT_NO_PAS & the value of SUB_PHONE_NO_PAS
Example
Table has 1 entry of the following
SUB_ACCT_NO_PAS   =  "XXX-AAA-123"
SUB_PHONE_NO_PAS = "(510)- 111-2222"
Keyfield should equal  = "XXX-AAA-123(510)- 111-2222"

Thanks
Bruce

Answer : In ACCESS (2007) - Is there a way to set a feilds defualt value to a combination of 2 fields

Bruce,

Why do you want to do this?  For one thing, this is a derived value, and as such it should not be stored, and instead be calculated on demand.  For another, now whenever the acct number or phone number changes you must also update that combined column.

If the column will not be unique, then it cannot be a primary key; if all you want is an index, you can create an index, unique or otherwise, that comprises the two columns:

http://en.allexperts.com/q/Using-MS-Access-1440/Creating-Unique-Value-check.htm

(That covers a unique index, but you use similar work steps to create a non-unique index.)

Patrick
Random Solutions  
 
programming4us programming4us