In MS Access 2016, can you create a checkbox or yes/no field that synchronizes with other checkboxes that meet a certain criteria? - ms-access

Picture of my relevant fields simplified for this example:
I am currently working on updating a database in Access for work that has more or less been just a spreadsheet up to this point. As such, I have a lot of information stored on a single table and I'm looking to avoid creating new tables that have to be manually filled in if possible. I track our purchases, confirming whether or not all the items on a particular purchase order or "PO" has come in, or if that PO only came in with a partial shipment. This database does not track POs as they are created, only as they are received by shipping, so I do not have a separate table that lists all the POs.
I am trying to create checkboxes in my table that synchronize with other checkboxes of the same PO, so when I receive the final shipment in for a PO, I can click "Order Complete?" (see linked image above) and all of the checkboxes with that same PO# will also be selected.
So far, in my fairly limited Access knowledge, I have attempted to make a new table from a query that listed only shipments with PO#s and then removed duplicate PO#s. I put the same "Order Complete?" field in the new table and then linked the PO# field on both tables and the Order Complete? field on both tables, but this didn't match them up. My coding knowledge is fairly limited and a little rusty so I was wondering if there was any simple way to do this without a really deep dive into coding.

Related

How to save row values from one field in subform to main form record? - Access

I have a parent form (frmGroupSession) that has a subform (SubFormParticipants) in datasheet view. The subform is based off a query that selects all participants ([CLIENT ID], [NAME], [ATTENDED]) that had attended a specific group [GroupID] on a specific date [GroupSessionDate]. The parent form saves to a table that logs group sessions (tblGroupSessionLog). I need to save the group's participants [CLIENT ID] to the record within tblGroupSessionLog
Basically, I need to pass data from the subform to the record within tblGroupSessionLog. I'm not sure what the most effective way to do this, if it's possible at all. Ideally, I would like to have each unique participant [CLIENT ID] stored in its own field within tblGroupSessionLog. If there were 20 participants in the subform then each row value from the first column/field [CLIENT ID] would be passed to the corresponding field within tblGroupSessionLog ([ClientID1] thru [ClientID20])
I am relatively new at this. Even asking the question was difficult.
I am not sure what else I can provide to help you wizards with the solve, but let me know and I will.
Thoughts? Ideas?
Access 101 : You have a many to many relationship You should look that term up but in short it means clients can belong to many groups and each group can have many clients. (so bang your data into a normalized structure similar to the following:
First tip make sure to add the relationships under database tools (you should look that up). Access needs to know how the tables are related to manage the keys behind the scenes and sometimes access makes better decisions about automatic form creating when it already knows the relationship structure. Once your data is properly structured access makes it easy to produce functional if much less than styling data entry forms which can also be used as even worse search forms. For instance Click on any table and hit create form on the ribbon and access will create the data entry form form you.
Basic Style tip 1: Always delete primary key fields like ClientID from the form. The field is still there in the form's record source being managed by access. Users almost never need to see any table keys. This gives you a basic data entry form which you can also use to scroll through any clients you have entered using the record selector circled at the bottom of the frmClients.
Play around with the record selector to see how it works. In particular go past the last record and you will find you can enter new clients and access will automatically give them a ClientID. You can also cycle through your Clients and update them using this form it just isn't stylish. In the same way we can make a form for the groups table.
You make a form for the frmGroupSessions table in the same manner as the others but add a step. Replace the text boxes holding ClientID and GroupID with human readable comboboxes. Here is a link to help with that: https://www.google.com/search?q=access+change+text+box+to+combo+box&oq=access+change+text+&aqs=chrome.0.0i457j0l2j69i57j0j0i22i30l2.7503j0j1&sourceid=chrome&ie=UTF-8#kpvalbx=_r0sFYJ7vBcfY5gLz2aTgBw15
Becomes:
At this point play around to learn. Use the Record Selector at the bottom of frmGroupSessions to add and modify data. Play with the Tables and see what happens. Start messing with the form properties in particular the default view. Soon you will have ideas about how the form could be better and you can start figuring out how to style them.

MS Access: How to search a value on a table by clicking on a form record

I'm pretty new to Access and coding in general and I've been working on a database that was filled with data extracted from SAP.
I have a query that works as a way to "summarize" the information of a bunch of records from some purchase orders, it does sum the total of each PO, it's date as well as other information. It does consolidate a variety of items related to the purchase order into a single record that is displayed in a continuous subform for easy analysis in this structure.
[MES_CORTE][SOLPED][PO][FirstMIGO][TOTALPOVALUE]
This way, the user can preview easily each purchase order, date, value and other relevant information. This query is also used to generate some reports.
However, I want to be able of opening the source table ([Registro_OC]) and search the related records by clicking a field on the subform for a detailed view and posibly to edit or enter new data. is it posible?
I've tried to code some macros but can't figure out how to reference the table fields related to the query fields that are on the form.
Also, it seems that Access doesn't allow to create subforms based on continous forms.
Any help and opinions are appreciated.

Inventory Transactions between locations - Ms Access

I'm currently working on an Inventory Control db that allows tracking stock transactions from one location to another but, I can't figure out how to create 2 records simultaneously on a "Transactions" Table based on the same data.
Basically, I'd like to create a form where I enter Item, Qty, From Location, To Location, Lot and have 2 records created simultaneously with a negative qty on the "From Location Record" and a Positive Qty on the "To Location Record".
I've attached a screenshot of the Form I envision and the desired Output in Data Records.
I have some experience working with Access forms and tables but this development is beyond my knowledge.
I Hope someone can help.
Thanks!
Form & Table screenshot
You would run couple of simple insert queries. One to move the stock out from the existing location, one to add it back to the new location.
If you are not well versed with writing VBA I would use the query designer, and include your form text boxes as the criteria. Save the queries, then use your button to run the queries one after the other.
I would also be tempted to bring in the existing location as a combo box based on the part number selected. That way you won't try and move something from a location that isn't correct,

Form - Create new record in *different* table based on current form data

I'm building a risk and issues tracker and have become stuck after some good initial progress. I'll explain my setup now.
Tables
A table containing all open projects
A table containing all open
risks and issues
Relationships
A one-to-many relationship between with project ID (Primary Key in the project table) to the risks and issues table
Queries
A query that will filter results from the projects table that have been selected in a combo box
Forms
One form containing a combobox that allows the user to select a project. There is also a text box, which will be populated based on the selected project. The text box is populated using DLookUp on the above query, and I have chosen a field to be populated from that. This all works fine.
I am able to select a project and see a little information about it using the above set up. The next step for me is to be able to add a risk or an issue.
What I would like to happen is to have a create Risk / Issue button, which will pull across the Project ID (primary key) from the selected project, and add a new record in the **risks and issues* table. I will also need to add in additional information about the risk, dates, owner etc.
Also, by having the project primary key tied to each risk, I should be able to pull in any additional info about the project that I require.
I can write more if required - I'm not really sure which information is needed. Also, the form 'sits on' my projects table which could well have been the wrong way of doing things, however I still don't know how to bring in the data from two different tables.
I appreciate any effort and patience put towards this.
From my understanding of the question it sounds like your trying to update your risks and issues table with a single form that is bound to your projects table. If you're adding a record to risk issue table with a bound form it needs to be bound to that table.
My best answer would be to start fresh with a new form created by the wizard.
Make sure you have all the fields you want in your form in the risks and issues table.
Create a form based on this table using the wizard.
Change the Project ID control to a combobox by right clicking and selecting change to, combobox.
Set the row source to take project id and project from the project table and then make sure project id is the bound field and project is the displayed field(by adjusting column widths and bound column properties).
After doing this you should have a form that updates your risk and issues table while selecting the project from your project table. If this is not what you were asking or you wanted to do it a different way let me know I'll see if I can help.

Microsoft Access 2010: Update a field in another table on button click

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.