Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Al;ter Table problems with backend table

Status
Not open for further replies.

EddyLLC

Technical User
Mar 15, 2005
304
US
Trying to change the field size of Field1 in backend table flkpTable1 to 32. This statement gives me an error can't find table or constraint. Because it is a backend table I believe there must be another way to reference it though nothing I've tried works. Is there a way to use this with a backend table? Thanks.

DoCmd.RunSQL "ALTER TABLE flkpTable1 ALTER COLUMN Field1 TEXT(32);
 
Do you have rights to modify the back end tables?

Have you tried doing it directly on the back end tables as opposed to through Access?


Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Thanks for the reply. Short answer, yes I have rights. I developed the system and distribute it to end users. The end users do not have rights so this code is part of an update I send out. When a form opens it executes During my testing is when I receive the error message.
 
I would try some DAO code:
Code:
Dim dbBE as DAO.Database
Dim strSQL as String
SET dbBE = OpenDatabase("F:\data\BackEnd.mdb")
strSQL ="ALTER TABLE flkpTable1 ALTER COLUMN Field1 TEXT(32)"
dbBE.Execute strSQL, dbFailOnError
Set dbBE = Nothing

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
That did it! Thanks for all the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top