Same value written on all records automatically

K

Kim Wennerberg

In anticipation of my various Access deatabases being combined someday, I
would like to automatically populate a column on every record with a project
name I decide upon.
-MS Access 2007
-Users create records through forms created using the built-in feature to
create split forms.
-There are about 20 forms which create records for about 20 underlying tables.
-One separate database per project at this time. (Which is what we want for
now because we will not be networking the databases-- each project will be
separate mdbx, sometimes copied and moved around using USB jump drive.)
-It's OK for the value to be set rather manually and technically by me in
code for each copy of the database-- no need for form to create that value.
 
T

Tom Lake

Kim Wennerberg said:
In anticipation of my various Access deatabases being combined someday, I
would like to automatically populate a column on every record with a project
name I decide upon.
-MS Access 2007
-Users create records through forms created using the built-in feature to
create split forms.
-There are about 20 forms which create records for about 20 underlying tables.
-One separate database per project at this time. (Which is what we want for
now because we will not be networking the databases-- each project will be
separate mdbx, sometimes copied and moved around using USB jump drive.)
-It's OK for the value to be set rather manually and technically by me in
code for each copy of the database-- no need for form to create that value.

I'd use an Update Query to set the value on existing records
and change the Default property for the field to the desired value
so future additions would have that value automatically.

Tom Lake
 
J

John W. Vinson

In anticipation of my various Access deatabases being combined someday, I
would like to automatically populate a column on every record with a project
name I decide upon.
-MS Access 2007
-Users create records through forms created using the built-in feature to
create split forms.
-There are about 20 forms which create records for about 20 underlying tables.
-One separate database per project at this time. (Which is what we want for
now because we will not be networking the databases-- each project will be
separate mdbx, sometimes copied and moved around using USB jump drive.)
-It's OK for the value to be set rather manually and technically by me in
code for each copy of the database-- no need for form to create that value.

I'd just add a text Project field to each table, with its Default Value set
per database to that database's Project name. It's not necessary to make any
changes to your forms or code; when a new record is created it will contain
the project.

This may be unnecessary and a waste of space, though, as this field could be
added later in the process of consolidating the databases.
 

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