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?
For a bonus question, how can I check if all the fields are correctly filled, and only then make the changes and saving process?
Any help appriciated...
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 Forms![Add employee]![Id].Value Text;") MsgBox "Saved!" End Sub
Any help appriciated...
Comment