I want to understand how to create a form which will look like a "table of something". Here is what I mean:
Above is a screenshot from "Students" template (one of built-in templates of Access 2016). So, you can add new students here and easily edit any information. For example, you can change the "Level" of the student from "1st Grade" to "2nd".
Well, I understand that this form is attached to "Students" table:
But when I try to create some form myself, it doesn't contain a list of students. Instead, it contain the details of only one student:
How I can achieve the desired result, shown on the 1st image?
Use for form's Default View Datasheet or Continuous Forms instead of Single Form you used.
Related
Could someone please help me with configuring my access database? I would like to use a combo-box at the top of the form where the user selects from the available work forms (Column 1 in Table) and then it displays who is involved in the form. Currently it displays every field and to reduce to the information displayed I would like it to only display information if the cell has a value in it.
Am I using the wrong tool? Should I be using a Report instead? How's my table data, too much?
Many Thanks
My current form
My wanted result
The way I normally hide empty fields is to change the label for a field to a control and set the control source to the following:
=IIf([FieldName]<>'', "My label:", Null)
Then I set the CanShrink property on both the "label" and the field to Yes.
Finally I make sure the section it's in (typically the detail but you may have reason to use something other) also has CanShrink set to Yes.
When you stack the controls on top of each other in this manner you should get the result as you posted.
Note: this only works for reports or if you print the results of a form. If you do not intend to allow entry of data into the form it would be better served as a report.
I'm building a multi-page form with subforms for a number of tables. The form is to collect very detailed information about patients, and the patientID is included in several tables.
Can the patient ID input from the main form(master table) populate a hidden field with the same patient ID in subsequent subforms?
Thanks for any assistance.
As Parfait stated the answer is yes... (at least if I understand your question correctly) You can bind these fields together using the subforms Link Master/ Child Fields Properties as circled in red
But Note: If you are using a Navigation Form this same Parent/ Child linking does not exist as these sub forms are filtered. If that is the case you will have to handle this differently probably using vba.
tldr: I want to create a form where specific fields from specific records are displayed based on filters or parameters. I do not want to use a subform or multiple item form.
the context: I am creating a database with information about different countries. My table Indicators (picture 1) contains country names, indicators names (e.g. Population, GDP, ...) and the respective values. I will collect data on the same indicators for every country.
I want to create a form where I can select a country, and then display the values of the indicators are for that country (picture 2).
I do not want to use a multi item form, because I want to create a visually appealing layout.
I have made a sketch of my data table
And the form I want to create
EDIT: Actually the form should look more like this, i.e. not a tabular layout.
I would be greatful for any suggestions how to build such a form.
You can start with the form wizard to generate a simple data-bound form from your table. Then you can change it to show one record at a time, make all the controls read-only, and add a combo box to select the country and add a little VBA event handler to the combo box so that whenever its selection changes, the form navigates to the record for that country. Of course, in a form you can customise the layout to show indicators in any style you want. So this approach should fulfill all your needs.
With very little effort, I can get the following form and subform:
A little more tampering with the layout, and you can have exactly what you want.
To fill in various boxes, you can use DlookUp and you can use a recordset to write to your textboxes, but it is all quite messy.
I want to copy (populated) data, say a "company" name from a form, to another form, and/or web page. This (populated) data field changes, based on what the client enters, however, the resulting data is always a "company".
Is there code I can paste into my HTML document to do this?
To better clarify what I want to do, please see as follows:
("To: ____")
This is on the top half of my web page in a word document contained in a form.
("Bandera") is the company name.
This is on the bottom half of my page in a word document contained in another form.
All I want to do is copy the "company" name (in this case Bandera) to the "To:___" on that form.
I only mentioned the fact that the company name "Bandera" changes, in case this has any affect on the issue.
I am not a programmer and do not know any languages, so I am looking for the easiest way (a code I can paste into my HTML document) to accomplish this.
Thank you,
Michael
This doesn't look like a problem with a simple cut and paste solution. Since you haven't specified what technologies you're using, i'll keep it generic. Two options that I see are:
Have the user submit the form, take the entered value on the server side and set it as a value/default in the resulting (your other) form that you return.
If you're just looking to populate another form on the same page, you can hook the onblur/onchange event of the input control with javascript and populate the value of a second form using something like the dom/javascript function GetElementById or GetElementByName.
Hope this helps point you in a useful direction.
It sounds like you are referring to a data-bound fields?
I am assuming further that the Company is populated from a database as an ID/Name hash/datatable.
If you are using ASP.Net, there a few options of which some are: storing your key for the data-bound field in Session, moving it across to another page using inline variables, or storing the selected Id against a user details table, and retrieving the ID on the other web-page.
I will preface this with saying, this is my first time using listboxes and earlier posts were criticized for lacking detail. So, all help is greatly appreciated and I hope this is enough information without being overkill.
Currently, I have a listbox updating a junction table with an on click event (iterates through selected items and if they are not in the table it adds them). The list box is also updated by an option group (based on the option group value a query populates the list with the appropriate items and they are selected/highlighted based on the junction table). Also, when items are a "sub-category" the "category" is also selected. This functions perfectly until I ask it to do more...
Problem 1: I need to differentiate "categories" of items from each other. So, I have included a blank item to the list box to add a space between categories. When the blank items are present the listbox does not update the junction table properly and vice versa.
Problem 2: My users want to be able to deselect the "category" under certain circumstances. This is fine, just de-select the "category" after the "sub-category" is selected. However, the "category" is re-selected whenever the listbox is clicked again because it iterates through all entries.
Perceived solution for both problems: Return only the index of the item (de)selected and manipulate accordingly. Is this possible? If so, how?
OR: Should I take a different approach?
One can think of a list or combo box as a low-resource sub-form. Conversely, one can use a sub-form to take care functions usually handled with a list or combo box.
I don't understand all that you're trying to do, but I do know that "up-sizing" to a sub-form is usually the answer when a simple control (for whatever reason) can't cover the need.