Look at afields() and alter table. However, it is better to track and control the table structures before your app runs. A good time to do that is when an update is installed. The update can go out and modify the tables as necessary - add those fields which were added in development but don't exist on the client's system yet. I recommend you look at SDT (Stonefield Development Tools) for this. It will automate it for you and handling the table structures modifcations required during updates at client sites.
http://www.stonefield.com/sdt.htmlOr did I miss something and you are using a different backend than VFP tables?
>Terry,
>
>At the moment a message appears 'field phrase is missing' if the control source of a column in a grid is assigned a field name and the field name has been changed or does not exist within the table.
>
>
>Is there any way of capturing the incorrect field name and then replacing it with a correct value.
>
>Thanks
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"