ms access Add, Edit, Delete Items through an Access form - forms

I'm not real familiar with inputting data through forms. Up until now I've just been handling the data from the table. However, now I have a table with two pieces of information:
Group ID
Each ID is in a group, not all IDs are represented in the table (ie there is another table with a complete list of IDs...many to one), and multiple IDs can be associated with the same group.
I want to make a form that allows the user to add a new ID/group row, edit an existing ID's "Group," and delete an existing Row. I want the user to see the changes he/she has made. I think there's a way to show a snapshot of the table as part of the form? How do I do all this?

Have you tried a continuous form? You can use a combo to display additional information for each control/field, if that is required.
EDIT re Comment
From your comments and original post, it seems that what may suit is a main form and subform. The subform can be set to prevent editing - it will display the existing groups. The main form will have your combos and buttons.
As to the various types of form, look at the Views Allowed property for the form, you will find:
Single Form (suitable for main form)
Continuous Form (suitable for subform)
Datasheet

Link one table (or query) to the main form and your second table (or query) to a sub form. Drag your sub form onto the main form. Tie the two forms together in properties (sub form) under link master fields and link child fields add the key ID.

Related

Repeatable Form elements

I need to allow the users repeat some of the form fields(or form groups) in the survey forms. There should be a + or - button next to the field that if the user clicks on +, then a new field is created.
Example: https://www.rhyzz.com/repeatable-fields.html
I would be surprised to know if Qualtrics doesn't have this feature.
I google for this but no success.
You can't create new fields (choices, answers, variables, etc.) on the fly in Qualtrics. A field has to be defined in the survey for it be be saved in the response data.
You could write a JavaScript to show and hide fields to give the appearance of adding and removing fields, but you would have to define the maximum number of fields in the survey beforehand.

Take value from field in Form to a new record in other Table

Would really like some guidance on this one. Not as easy as the title might say at first and I'm stuck beyond all and frustrated.
So:
I have a MainForm (With a current ID I would like to stay on!)
I have a Subform (search engine that searches in various linked excel files)
I have 2 tables; one for the Mainform, and one for Items
So on the Mainform, I display the Subform (search).
I do my search and find a specific item in the excel files
I have a command button, that I want to click save the found item in the search field, into my ItemsTable as a new record.
Currently I'm doing this:
Private Sub Command13_Click()
Forms!MainForm.Form.Item1.Value = Me.Searchresult.Value
End Sub
This does actually post my search result into a new field and saves it into the itemsTable.
My problem: I don't need to actually have a field to post to. I just want it to write directly to my table and store it there as a NEW record. (Right now it just overwrites the previous data. Logically because its the same field every time with the same properties).
Can someone PLEASE help me with this one?
Options:
set focus to the subform container then move to New Record row followed by your code, this is not simple, review https://access-programmers.co.uk/forums/showthread.php?t=127337
use SQL INSERT action then requery the subform
CurrentDb.Execute("INSERT INTO Items(Item1) VALUES('" & Me.Searchresult & "'")

Can you control the print order of Access form with subforms?

I have a form in Access 2007 with 2 subforms. Each one has it's own table. All 3 tables have a primary key to link on. The 2 subforms can be linked by the primary key and a second field. Users want to print the form, rather then a report, to review the record data. When the form prints the order is as follows:
Main form, [subform1]![record1], [subform1]![record2], etc, [subform2]![record1], [subform2]![record2], etc, last page of the main form.
How do I force the form print order to be:
Main form, [subform1]![record1], [subform2]![record1], [subform1]![record2], [subform2]![record2], etc, last page of the main form.
I've tried setting up the table relationships and checked all the Master-Child links. The form navigates through records correctly. I've also looked at print options but didn't see a solution there either.
You will need a query where you join the master table with the two subtables.
Then apply the requested order and create new form for printing.
Still, a report would be better. Remember to remove any sorting from the query and specify that in the report.

Combobox governing subform possibly updating tables

I have a form, the form is bound to a query which returns only one field. On that form is one combo box, bound to the field from the query, a subform object and some other unimportant stuff. The Master-Child relationship between the Form and Subform is set to that same field. The intent is that dropping down the combo box allows me to add information on the subform pertaining to that record in the combobox (it's a list of classes in a school, for context). This is done through a form and subform as I have various different tasks that need to be done for each class - the intent is to be able to select a class on the main form and then use command buttons on it to select which subform is opened depending on which task I wish to perform.
However, the Combo box appears to be trying to update a table - I'm not sure which one as the error message isn't specific:
The changes you requested to the table were not successful because
they would create duplicate values in the index, primary key or
relationship. Change the data in the field or fields that contain
duplicate data, remove the index or redefine the index to allow
duplicate values and try again
appears if I select any value other than the first one from the combo box and then click in the first text box on the subform. However, I can click in the subform with the first entry in the combo box selected and add data successfully, I've checked and it is appearing in the underlying tables.
It seems to me, as a relative novice in Access, that the combo box is attempting to update the underlying data source when it is changed, though it has no macros. I would assume there are items in the properties of the form or the combobox that prevent that from happening but I can't find them. That is just a guess as to what's happening, though, and I could be wrong.
It's possible that this is related to this question but I could be mistaken there as well. Regardless, the Form shouldn't be able to update/edit/add records but if I set Allow Edits in its properties to "No" I am unable to actually select a value from the combobox - I have set the other "Allow" properties to "No" without a problem.
If you change anything in the main form and then click on the subform then Access will try to save the data in the main form automatically. Maybe you can try to temporally exchange the combo box with a text field for testing. That should help you to clarify the problem.

Cannot see records in form bounded to table in Access

I have a form and it's record source is a table. I created the form separately and added the control sources to the different fields in the form and also changed it's record source. I imported values from an excel sheet into the table and when I open the form, I do not see the tabe values being displayed in the form. Any idea what I should do to see the table records in the form?
In form design mode, check the form's DataEntry property. It sounds like yours is set to Yes, which hides existing records and only allows new entries. Change it to No and you will see the existing records.
Another possibility is that a filter is active and no records match that filter.
Use a form wizard to generate a working form based on your table. Then once you can see the data being displayed in the form, customise as needed.