you need to explain what you are trying to do a little clearer.
If you actually mean you want to give the user alter control in your database to add their own fields to your tables this is very bad practice and should never be done.
If what you actually want to do is let them insert new records into one of your tables you can do this with an insert statement.
I haven't used Access in a long time but I beleive if you are using access forms you can permit insert in your controls (drop box, etc). This will allow the user to add new values in the controls and inserts them into your table for you or else you will have to write an insert statement to manually add the records.
In your form you should have a submit button. On the submit action you will add the alter commands. Like I said earlier it has been ages since I have even looked at Access but you should be able to double click on the button on the form which should bring you to the button click function. This is where you would put the commands.
If I were you, go through an Access tutorial or use the Access help manuals they should be able to walk you though the steps. Unfortunately I doubt they have a wizard for what you are looking for.
Ok.Now I have just one more question.
I created a form and a macro.the macro is a runSql with alter table statement.I just want to use the text boxes of the form for the table name,field name and field type of the alter table statement.I just wanna know how can I access them in the alter table statement?
Like I said earlier I am not an Access forms guru but I would guess that you would have to access the text boxes attributes from the macro. Something like 'textbox1.text', but again unless someone else who knows more about access form development chimes in I would suggest either reference book, tutorial, or help files to find the process. This process should not be too hard to find even a google search should give you some good examples on how to manipulate text fields in your forms.
The few times I have actually done anything in Access there was quite alot of documentation. Tons of people at microsoft are paid just to write docs so i am sure you should be able to find some decent resources.
Not sure what I can tell you. i have never used the Macros in Access and have no clue what the syntax error is. There is most likely some Microsoft syntax that you need but I don't know where to find except to troll some Access specific forums and tutorial. Did you look through the Access help files, sometimes they aren't over cryptic.
It is devoted to MS access so it would be a good place to take a look or most likely get a more informed answer then I can provide. It doesn't look like anyone else here has anything to add so i would take a look there for more help for this question.
If you're in one of those predicaments where cls.__private attributes just aren't enough since they can easily be accessed through inst._cls__private, and you need something a little more secure, here's ...