User Profile
Collapse
-
It worked, thank you so much... -
-
I altered my code like:
Code:Private Sub savebutton1_Click() Dim newColName As String Set newColName = Me.ID.Value CurrentDb.Execute ("ALTER TABLE table1 ADD COLUMN" & newColName & "Text;") mSaved = True MsgBox "Saved!" End Sub
Last edited by TheSmileyCoder; Feb 8 '12, 08:55 AM.Leave a comment:
-
Access add column by form data
Hi!
I am struggling with a piece of code. I am new to VBA and i want this code to create a new coloumn in a table with a name that is from a text box on a form (same form as the save button) on button press. But I am not exactly sure how to refer to the value...
Can somebody help me please?
Code:Private Sub savebutton1_Click() mSaved = True CurrentDb.Execute ("ALTER TABLE table1 ADD COLUMN
No activity results to display
Show More
Leave a comment: