Hi David ---
What does "icode" represent? Can you give a clearer picture of the type of data stored and what you intend to do with the "several tables" you mentioned?
>
>I am building a risk management system
>I have a one code table for my customers where they can put
>specific codes in , the table structure looks like this
>icode , ccodenumber , ccodename
>
>i am having a problem to get the primary key right.
>my primary key is on icode and ccodenumber .
>usually i have more codetables for my customers and then i put
>a program in each table that generates primary keys.
>I put this program in the default value of the field that is the
>primary key and i give some parameters to it like this
>do generatepk with "tablename" etc etsc,with one code table i have a combined primary key on icode + ccodenumber .I want to have the same idea as i used to with several tables(have a program in my default value) but i need more flexibily off determing which icode it is
>etc etc
>
>thanks
>david
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05