Carmen,
I have read this thread with great interest. If you want to use the fox2x approach I recomment that you follow this procedure:
1. Create a property for your form , ie om (shorthand to me for object memvars)
2. Instead of using scatter memvar blank or scatter memvar use scatter name om or scatter name om blank
3. Now there is a reference for each variable in the table which can be reached with thisform.om.fieldname from anywhere in the form. Be sure to create a property for each table that is going to be refrenced in the form. The major advantage of this is that the variables are scoped inside of the property and you don't have the nasty problem which could sometime arise in fox2x with the fact that memory var were public and scoping bacame a problem with complex apps.
If you want to use buffering and want to check for primary key validation then the general approach would be to do something like this
1. use the table that you are going to search AGAIN and then do the search on that table - use thistable again in 0 order mykey. seek value. if found then get a new key else key is valid. Note: when you actually save the record you must do this proc again to ensure that someone has not gotten this key in the meantime.
For most simple data entry the scatter name approach is good and cuts down on the complication as well as the fact that it seems so much more natural if you come out of heavy fox2x coding.
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!