Teknologik
New member
- Local time
- Today, 11:04
- Joined
- Feb 10, 2011
- Messages
- 7
Hello,
I have created a Module which is used to amend the data type of a table from a number to Text 30.
This is the code used.
Public Sub ChangeDataType()
Dim dbase As DAO.Database
Set dbase = CurrentDb
dbase.Execute ("ALTER TABLE [FM 1 Cref Make] ALTER COLUMN [CALL_IN_REF] text(30);")
End Sub
This module works perfectly fine when run manually but when it is in a Macro
as a RunCode the following error message appears when the Macro is run.
Error
The expression you entered has a function name that MS Office Access can't find
Even though in the macro the name of the ChangeDataType()
Any help much appreciated.
Thanks
I have created a Module which is used to amend the data type of a table from a number to Text 30.
This is the code used.
Public Sub ChangeDataType()
Dim dbase As DAO.Database
Set dbase = CurrentDb
dbase.Execute ("ALTER TABLE [FM 1 Cref Make] ALTER COLUMN [CALL_IN_REF] text(30);")
End Sub
This module works perfectly fine when run manually but when it is in a Macro
as a RunCode the following error message appears when the Macro is run.
Error
The expression you entered has a function name that MS Office Access can't find
Even though in the macro the name of the ChangeDataType()
Any help much appreciated.
Thanks