Could anyone point me in the correct direction of how to code VBA to delete a specific column either by name or by numeric reference? I was thinking it would be something like this:
Or if there is a better way than using the DoMenuItem command, since according to the help file, it is only included in current versions of Access VBA for compatibility reasons with older versions.
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.DoMenuItem acFormBar, acEditMenu, acDelete, Column(3)
[b]or[/b]
DoCmd.DoMenuItem acFormBar, acEditMenu, acDelete, Column("Name")
Or if there is a better way than using the DoMenuItem command, since according to the help file, it is only included in current versions of Access VBA for compatibility reasons with older versions.
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