Hi everyone, i'm very amateur in VB for Access. I'm just want to add a column into a table automatically. I've a table named "Times". Now i want to add a text filed into this table. I name the field "Third". What i write is:
Private Sub Toggle8_Click()
Dim SQL2 As String
SQL2 = "ALTER TABLE Times ADD COLUMN Third TEXT(255)"
DoCmd.RunSQL SQL2
MsbBox ("Done")
End Sub
I do realize it's simple, but i've not succeeded to compile the right syntax. It always says:" Compile error: Sub or Function not defined"
Please, help me.
Thank all of you for your help.
Private Sub Toggle8_Click()
Dim SQL2 As String
SQL2 = "ALTER TABLE Times ADD COLUMN Third TEXT(255)"
DoCmd.RunSQL SQL2
MsbBox ("Done")
End Sub
I do realize it's simple, but i've not succeeded to compile the right syntax. It always says:" Compile error: Sub or Function not defined"
Please, help me.
Thank all of you for your help.