I am working on a database that has one main table with the entry rows having an individual table for calculations.
So I have about 9 tables that have calculations /values in that are associated with an individual indicator field entry in my main table. I would like to link the calculation tables to the individual entry.
The subdatasheet allows me to do this. However, it populates all the entries with the same table which I do not want as one calculation table is only associated to one entry.
I can’t create one table for all calculations as they have different types of data and are calculated differently so I can’t link with regards to relationships.
The only solution I can think of is by populating a new field called “results calculations” and populate it with the title of the calculation table associated to the individual entry.
Is there another way I would love all the data to be as accessible in one table as simplified as possible.
(I am new to MS Access so any advice will be appreciated.)
The result of using subdatasheet
What I need to link to each indicator
Related
With my limited knowledge of Access, I have been struggling to figure this one out.
I have 4 tables. tblJobDetails, tblDrawings, tblDrawingFixtureType and tblFixtureType. They are related to each other in that order.
What I have been trying to do is a query based from tblFixtureType. I want my users to have a datasheet where they can input all the fixture types for the given job, but keep them under that particular JobID. I have not had much luck in that department. All queries I have made either show every single type entered in the DB, or nothing.
The JobID is the PK for tblJobDetails and is a FK in tblDrawings. tblDrawingFixtureType is intermediate/junction table that is meant to hold quantities, but has DrawingID and TypeID as its FK's.
So how would I correctly build a query for my users to input all fixture types (designations), but keep them assigned/filtered under that particular JobID?
I am sure more info will probably be needed, so please ask.
You don't build a query to solve this problem. What you do is build a form based on each separate table.
In Access you model the parent to child relationships by using form + sub-form combos.
So, you might have a form that say lists out job (continues form).
You click on a row, and then launch a form with a nice display of the job details, and then in the sub form, you allow entry of tblDrawings.
The sub form will hook up the FK. And to edit/select the tblDrawingFixtureType, that drives a combo box in that sub form to select the fixture type, and it will save the PK of FixtureType in the one column.
All and any of each form (or even the sub form) is to be based on ONE table, and NOT a query. You don't edit data in tables, you build a form based on the table. If there is child records to add to that one record, then you build a sub form (and again, that sub form is based on ONE table).
Not only does this mean you don't have to create any queries, but you also don't have to write any code since when using a form + sub form, you get editing of related data that way.
I want to create a form populated with data from two tables, say table A and table B. The data from table A refers to a single row in A but the data that I have to retrieve from B is several rows long. I succeeded in doing so by setting up an unbound form and running a SQL JOIN query to fetch the appropriate data in VBA.
Then with VBA I was able to distinguish the data from the multiple rows in B.
Is it possible to achieve the same with a bound form so that I save myself from excessive coding? I can't figure out a way to populate my controls in the form with data from the rows in B.
If I understand you correctly, your two tables are related, that is, you search in B based on a value on A. If that's the case, the usual solution in access is to use a main form and a subform inside the main form. Then you link the two. When you insert the subform, a wizard will appear asking for the relation. You set up the columns that are common in the two tables, and everything works, usually. You can anyway add the relation later.
I'm trying to make a master table in ms access that constantly updates the records of the unique model numbers based upon the most recent date.
The premade table was created by using a select query that brings all the records of multiple tables and inserts them into a single table. Within each table there are multiple fields however the only relevant fields are the Model number field and the Date. Across the tables the unique model numbers are repeated, but their individual time stamps are different.
I need the master table to select the records with the most recent date and place the whole record into the master table. I'm new to ms access and I don't know how I could do this. Any tips of suggestions would be most appreciated.
If you would need such a table then I'd say there's definitely something wrong with your database design.
Having said that, why don't you query on the most recent date of tables that hold Model Numbers?
It might help if you could elaborate on why you'd want to do this, as in why you have multiple tables that hold Model Numbers.
Maybe your current database design is open for improvement.
Kind regards,
Rene
I am a newbie to MS Access and trying make a productivity tracking program for where I work.
I have a main form that's bound to multiple subforms with ID and I need to add one more subform.
That subform is going to fetch all data from Personnel table in continuous form view, and I would like to add one checkbox and two more fields to each row in continuous form. The ticked rows needs to be stored in a different table.
Is there a way to do this?
You'll have to make the new table
Then make a query which relates the new table to the old and returns all of the values you want edited or displayed in your subform.
Make the subform based on this new query, since it is only 2 tables it should be editable if the join isn't to complicated.
Then using the Locked and Enabled Properties of the controls on your subform you can change what is editable and what isn't.
I will say that if this is a one to one relation between the new table and the eixisting table it would be much easier to just add the fields and deal with security/data reporting concerns elsewhere.
Attempt to clarify more
I am assuming your Personnel Table has a foreign key to the main table ID and a personnelID of its own. To have more fields that correspond to records in the Personnel table you need to create another table, we will call it CheckBoxes. Checkboxes needs to have a foreign key to the personnelID and then whatever fields and check boxes you require.
Then you need to make a Query that pulls from Personnel and CheckBoxes and joins them on the foreign key you have relating the two tables. Then make your continuous subform based on the query rather than a table.
Access makes the query creation really easy and this relaition should be simple enough to be able to edit through the query.
Again I would consider adding these fields to the personnel table rather than making your database more confusing than it has to be but that is up to you the designer.
Basics about the database
I am working on a (relatively) simple database that stores inventory data. I am using Microsoft Access 2010 in order to do this. I have six tables with the following relationships:
Relationships of Database
I have created forms which combine the Transaction table with Ordered, Received, Allocated, or Dispensed. Each form requests an amount which will then be used to update On Hand, On Order, or Allocated (from the Material table) respectively.
The Problem
For example, my form to update Transaction and Order should be able to take in the Amount ordered, save all the data from the fields to the Transaction and Order tables as well as add the amount from Amount to On Order in the Materials table.
I have been working on this database for the past two days. I have searched several times for possible ways to perform a similar function, but have come up with nothing. All the tutorials I have found which seem remotely close to what I need to accomplish are for versions of Access which are much older than 2010. Unfortunately I have had little experience with the actual coding within Access, so I am stuck clicking around within the buttons on its menus.
What I have tried
Currently, the program is set to run the following Update query:
Screenshot of update query
This query works if I have one Material stored in the database but adds all the Amount values from Ordered to On Order every time it is ran, which is unfortunately not what I need it to do. I only need each Amount value added to On Order once.
You need to relate the Ordered and Material tables by adding a foreign key field to the Material table, ex. OrderedFK (Long Integer). This new field must be updated whenever a row is inserted into the Ordered table (assuming the "No" Field is AutoNumber). This is typically performed by using a Form (Ordered) and Sub-Form (Material) and setting the sub-form' Link Master (No) and Link Child fields (OrderedFK).
You can then join the Ordered and Material tables on the Update Query to achieve the desired result.