I was attempting to use 2 short sql strings to basically remove a field from a table, and rename an existing field to the removed field's name. Here is what I have been trying.. any suggestions?
I've tried using modify, rename, change, and add in the second option there, but can't seem to get it to work. Does anyone know a good way to rename a table field (there is existing data in the field if that helps).
Stephen![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
Code:
DoCmd.RunSQL ("alter table " & strOriginalTable & " drop column [TransDate]")
DoCmd.RunSQL ("alter table " & strOriginalTable & " modify column [NewTransDate] Date to TransDate")
Stephen
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV