Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help an archaeologist!

Status
Not open for further replies.

KLWiley

Technical User
Jul 4, 2013
3
US
Hi. I'm an archaeologist working on entering excavation data into a db. We have thousands of artifacts and I'm trying to streamline the data entry process. On our form, I'm hoping to have a checkbox that indicates that the values of certain fields for that record should be the same for a range of following records. For example, each record represents a single artifact. Artifacts are grouped by catalog number. So, say catalog number 65 consists of artifacts 65.01, 65.02, 65.03, etc. I would like to set up a procedure so that if field values for artifact record 65.01 should be same for the rest of the artifacts within that catalog number, then those values would be automatically filled in.

I'm an archaeologist and not a programmer! Any help/suggestions you can provide would be greatly appreciated!
 
There are a ton of good references on basic relational database design, what you are asking is not the way you would do it in a relational database. One basic rule is not to repeat information for like objects. That means there is likely a relation that can be established. So you would likely have something like this

tableCatalog
CatalogID
....
otherFieldsUniquelyDefiningACatalog

tableArtifacts
ArtifactID
CatalogIDForeignKey (A Key relating that artifact to its parent catalog)
...
OtherFieldsUniqueToThatSpecificArtifact


Then you just relate your artifacts to the catalog and they get all the properties of that catalog
 
Thanks for the reply. So, yes. I have a catalog table that is related to an artifact table. Only sometimes do artifacts within a catalog number all have the same values for certain fields. Sometimes they are different. So, it's not just a matter of setting values for the catalog numbers, which by extension would apply to the artifact numbers as well. Hope that clarifies.
 
Is this what you are trying to do?
1) Have a master form where you create/select a catalog
2) Have a subform for adding artifacts to a catalog
3) When you add the first artifact to the catalog there are no default values for artifact properties
4) When you add subsequent artifacts to a catalog the artifact default values come from the values of the first artifact added to the catalog
5) The values can be changed for each artifact from the inherited defaults
 
There is already a catalog table and an artifact table. The catalog table is already complete. All of the artifact numbers are already in the artifact table. Each catalog number is a group of artifacts of the same material, found on a given day at a given location. So, for example, catalog number 1 could represent 5 pieces of ceramic found at xy coordinates on March 1. Then in the artifact table, there would be artifacts 1.01, 1.02, 1.03, 1.04, and 1.05. Someone is now using a form to input additional information about each artifact. 1.01 could be whiteware with particular decoration; 1.02 could be unglazed earthenware, etc.

However, sometimes, there might be 90 artifacts (ie 2.01, 2.02, 2.03....2.90) that all have the same descriptors (ie porcelain plate w blue willow design). Instead of having the person entering the data fill in all the data for 2.01, then input the same data again and again for the next 89 records, I would like to have a checkbox on the form that would automatically put the same info into those 89 records.

Is there some sort of code that can be written that would accomplish this?
 
The answer is yes, and there are probably many ways to do it. But need to completely understand your interface and what you have and how you want it to work. Eventually you will have to provide some real table and field names and the datatypes of those fields.

I am reading this, as that you already have the child records created with an artifact ID. So all 90 artifact records exist in the table just not populated with some descriptive field. You want to enter some info for one of the child artifact records and click a button to populate the fields of the remaining 89 records which are in the same catalog.

If that is the case you would basically run an update query on all records where the catalog ID is equal to the catalog ID of the current record you are working. To provide more specifics you would need to discuss the fields and control names with the values to update.

However, this is more complex if you are creating records or only want to populate some but not others. Please provide as much detail as you can for how you want this to work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top