PDA

View Full Version : How to create a button to Dynamically Add Input Form Fields in MS Access



unicorn74
02-29-2016, 11:49 AM
Hello,

I am trying to create a button such as "Add" that will add new fields to a form. I have not had any success researching this so any help you can provide will be appreciated.

For example, this database records system access for various users and there may be a need to add additional fields depending on the number of systems a user has access to.

Thanks!

jonh
02-29-2016, 12:29 PM
Fields are added to tables. Controls are added to forms.


You can only add controls to forms in design view. So normally you'd add all of the controls and hide/lock the ones that aren't required when the form loads.

unicorn74
02-29-2016, 12:39 PM
Thank you for your response. Sorry I was not technically correct in my description.

When creating the form I am adding controls such as a text box. I would like to create a button on the form for a user to click when they need an addition text box control. Is this possible?

jonh
02-29-2016, 12:46 PM
As I said, that's not possible. No.

There would be no point adding a new textbox anyway if it isn't linked to a field.

You could use a continuous form so each value is stored in a separate record, but then you're limited to a single datatype.