MS Access: Accessing data from multiple tables in a tabbed form - database

I have an inventory system in MS Access 2010, and am trying to make a form that accesses multiple tables. Here is the relevant part of the data relationships printout:
I have a tabbed form that I am using that, for each food item, allows our orderers to edit/view the food purchasing data for that food item, or edit/view the inventory data for that food item. This is what that looks like:
So, currently, the parent form is using [Food items] as the control source. I want the tabs to basically display (and update when edited) the appropriate data from the [Inventory] and [Food purchase data] tables for that food item. So for instance, in the example above, the Food purchase data tab should be searching for the record for Agave in the [Food purchase data] table, and using that to populate the fields for that tab (and likewise for the inventory tab).
What is the best way to go about this?

Simply, use subforms inside your tabs, maintaining Food Items as the main form's recordsource. Remember, forms are essentially visual representations of tables. So on the main form, build separate forms for Inventory and Food Purchases and then link them just as you do in relationships.
How to specifically integrate subforms on main form?
Build subforms as separate regular forms, either as single, multiple-item, or datasheet. Don't place anything in page header/footer as they will not show on main form. You can use form header/footer.
Then in design view of Food Items main form, go to the tab control and select tab area, making sure yellow outlines appears, then locate the subform/subreport control in menu in Design tab on ribbon (looks like a newspaper icon if you scroll towards the end). Select the form specific to tab.
Walk through wizard, setting up the parent/child linked ids which you can also do on each subform control's Data tab in Property Sheet. Now, form will appear in its own design view where you can stretch out, re-position, and manage its own controls accordingly.

Related

How do I populate choices for combo box in powerapps?

Novice business user here: I am trying to build a schedule separated by date in Microsoft PowerApps for Teams. It would look something like the arrival/departure board at an airport. I need my users to be able to change the status of an event on the schedule basically from "no go" to "go."
For my table, I created a table with columns showing the "no go" and "go" choices and set my default choices to "no go".
For my gallery, I created a nested gallery to separate the dates.
In the gallery, I can populate the fields I created in my table with the "no go" default values, but when I click the dropdown arrow in the combo box, I either get irrelevant choices from a different text column, or I don't get any choices at all.
I have tried making different changes to the "text" and "items" properties. I just don't know how to make the choices I created in the table populate in the combo box dropdown.

Can display two record detail with different fields on Account object layout page?

I have one currency field named Full Fleet Potensial and i want display only this currency field only on left side column, middle column i need to display all detail field and right side i need to display activity.
I can't display only single field on right side column when i drag record detail component it has no filter to display only one field.
is there any way to display single field?
I try to create new layout and try to apply on right side column record detail component but it will change layout for middle record detail component also
Edit: dynamic forms work on standard objects from Winter'23 onwards.
https://admin.salesforce.com/blog/2022/learn-moar-in-winter-23-with-dynamic-forms-on-standard-objects
Not out of the box (yet).
The feature to drop single fields on lightning page layout is called "Dynamic Forms". But it works only for custom objects and Account is standard. Keep an eye on roadmap, next releases, maybe there's idea to upvote...
A developer can create aura or lightning web component with your field, then you'd drop it on that section of the page layout.
If you have VSCode, sfdx configured (bit of upfront investment to set it up but the result will be the bleeding endge of technology SF offers) - look into https://developer.salesforce.com/docs/component-library/bundle/lightning-record-view-form/documentation. If you don't - in a pinch you can work out of developer console to create Aura version of this component (click the button in upper right of that documentation).
This is also a cool working example if documentation is not your thing: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.data_load_record. Aura version is here: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_load_record.htm

Inline add/edit/delete data in views in Drupal 7

I am trying to create a content type (say Meter). Each Meter consists of a "Meter Reading". This meter reading content contains three fields, say title, date range and usage. I have a Panel page where I display all the Meter Readings related to a parent Meter. I have displayed the Meter Readings in a tabular format.
I want the user to be able to add new Meter Readings without going to the default Meter Readings creation page. Rather than the default form kind of page, the user should be able to enter the data in the table view provided and it should be automatically saved into the project itself.
So, I want the functionality to be like:-
Display all the meter readings with two links, i.e., Edit and Delete,
When the user clicks on Edit link, the meter reading row should become editable and the user should be able to make the changes inline in the same table,
In the footer there should be a link for adding a new meter reading and when the user clicks on it, a new blank row should be added dynamically to the table and the user should be able to make a new entry into it.
Is there a module in Drupal 7 for doing so?? I have already tried out several modules for this such as SlickGrid, jQGrid and jEditable
Any help would be great. Thanks in advance.
Am afraid am not aware about a module that does all that out of the box. But in case you carry on with custom coding you can have a look at the following:
Edit and Delete options per row in views
Use Views Megarow. For working example you can have a look at how its used in commerce backoffice. Please note that you need to write the form structure ( FORM api ) for the quick edit form in a custom module. The Views Megarow takes care of ajax populating the edit form, its submission in client side, and refreshing the original row after the response from server.
When the user clicks on Edit link, the meter reading row should become editable and the user should be able to make the changes inline
in the same table.
Views Megarow doesn't support inline editing. But another module as suggested by #nmc does it. Its editablefields. But it doesn't have any edit/delete button. You click on the text directly ( provided user has appropriate permission to edit the field data ) in view.
In case you are going to use editablefields, then you would have to add another delete button in view, which one confirmation would redirect to the page that triggered delete action.
Since delete button would redirect to a default confirmation page, you may want to code a custom delete action which may override this.
In the footer there should be a link for adding a new meter reading and when the user clicks on it, a new blank row should be
added dynamically to the table and the user should be able to make a
new entry into it.
I suggest creating a small ajax form. Create a "Add Meter Reading" button in it, which on submission would create a meter reading node in the server. The ajax form should have parent information in a hidden field ( i.e. the Meter id). The ajax response for this form could be another script to load/refresh the view on client side.
Client side code to refresh the view can be found in Views Autorefresh submodule in Views Hacks.
If using views megarow you would have to add another jquery function on ajax response after view is refreshed - Trigger edit button.
Otherwise you may have to add some classes or theme to newly created rows in view to bring them to focus.
It is important that the entire views refreshes, so that drupal behaviours are attached to the newly created entry in table.
I don't know if there is one module which will meet all your needs but you may be able to use some in combination.
Views Bulk Operations (VBO) - has Drupal 7 support
This module augments Views by allowing bulk operations to be executed
on the displayed rows. It does so by showing a checkbox in front of
each node, and adding a select box containing operations that can be
applied. Drupal Core or Rules actions can be used.
editablefields - Drupal 7 version in dev
This module allows CCK fields to be edited on a node's display (e.g.
at node/123), not just on the node edit pages (e.g. node/123/edit). It
also works within views etc. Anywhere a 'formatter' can be selected,
you can select editable (or click to edit).
editview - no Drupal 7 support yet but I thought I would mention it in case you're able to adapt the code yourself
Editview is a plugin for the Views module. It allows you to create a
view in which the nodes are editable, and new nodes can be created.

Conditional Formatting based on layout view

Another question for you Filemaker Pro experts. The database I am developing starts with a Main layout with a number of buttons (e.g. insert new item, show all items, etc.). Each button is associated to a script, which takes the user to the relevant layout. In each of these layouts I show the buttons in a row, and highlight the current layout with inverse colour.
My problem is that some of the buttons lead to the same layout, viewed in different modes, and I don't know how to conditionally highlight the right button.
For instance, Insert new item and Show all items take to the same layout, however in the first case the script views the layout as a form and inserts a new record, while in the second I view as a list and show all records. The layout is the same, though, so I'd need to enact a conditional formatting based on something. How do I do that, and what should I check against?
Thanks in advance for any help.
Regards.
Presumably you are currently using the formula: Get (LayoutName) to decide on your conditional formula, why not try additionally using formulas: Get(WindowMode) and Get(LayoutViewState)?
You could conditionally format the button if (which sends user to MyLayout in browse mode):
Get(WindowMode)=0 and Get(LayoutName)="MyLayout"
Or (which sends user to MyLayout in form view):
Get(LayoutViewState)=0 and Get(LayoutName)="MyLayout"
.
Other functions which may help could be Get(FoundCount) and Get(TotalRecordCount). You can see the entire list of Get functions here.

Update database with Microsoft Access 2003

Hi guys i have a form with 3 tabs in it and every tab is supposed to update different table, can anyone tell how to do it with a button for every tab? Pretty much like a form built with HTML?
Access forms generally use bound data controls, which are quite different from HTML forms. If you want to use bound controls, place a sub-form on each tabsheet. Set the record source for each subform to the table you want to update. Then drop some fields from the table onto the subform.
If you want to use unbound controls, arrange some controls each tab as desired. At the bottom of each tab, place a button labeled Submit. In the CLICK event handler for each button, write code that does one of these two things:
Gather the values together, create an INSERT or UPDATE statement as appropriate, and have the database execute it with DoCmd.RunSQL.
or
Create an ADO or DAO recordset object for the row you wish to update or add and then write your values into the fields for that recordset.

Resources