If you prefer to have character PKs instead of AutoInc you could use a routine like this one:
http://www.feldstein.net/newid.aspPrimary Keys should be numbers that do not have any relation to the actual data (e.g. not know or devised by the users). They should be unique across the table.
>after change to AutoInc, i got error message Function argument value, type, or count is invalid
>at this line,
>
>but i need to insert it by hand (it must be character type),
>>cAlias = THISFORM.DATAENVIRONMENT.INITIALSELECTEDALIAS
>SELECT (cAlias)
>if act_flag="1"
>LOCATE FOR UPPER(shipno) =ALLTRIM(thisform.text1.Value)
>IF FOUND()
>=MESSAGEBOX("DUPLICATED")
>