Macro to create new field in access db

C

Chase

I have a simple database in which users need to be able to add new fields to
later down the road. I want to make a macro that will allow them to enter a
new field name and the macro will copy the last field on the table, paste it
underneath of that one as a new one, and then change the name to the one
entered. I want to do it this way for 2 reasons. All of the options will be
the same between new and old fields and I some of the options (combobox etc)
I don't believe can be set via SQL as I have to use Access 2000. What
commands in VBA would allow me to select fields and copy/paste them as a new
row into the table.

Thanks,

Chase
 
K

Ken Snell \(MVP\)

The descrption of what you want to do reads suspiciously as a situation
where you're committing "spreadsheet" in a database. Perhaps the need for
the new field is when the calendar year changes? or a new company name is
added? or some such situation?

Most likely, what you don't need is a new field, but instead a new record in
a table. A properly designed database will add records for new data, not
fields.

Tell us more about the specifics of what you're doing.. most likely, your
database will benefit from a change in your database structure and then you
probably won't need to add a new field at a regular basis.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top