Get selected item in datasheet - ms-access

So I've created Microsoft access database. The database is a few tables with forms to enter data into.
The forms are split data forms with only a header for buttons and a data sheet for the data entry, but I was wondering if there was a way with VBA to get the selected row in the data sheet.
Basically what I'm wanting to do is allow the users to select the item in the data sheet and clicking a button to go to that item in a different form.
Any ideas?

Selecting records in the datasheet section of a Split form will automatically navigate to the appropriate record in the form's Record Source, therefore, referencing any field on the form will automatically return the value corresponding to the selected record.

Related

Move to chosen record in datasheet subform based on current record in main form MS Access

I have a form that is meant to change records or add new ones. On the same form I have subform datasheet of the same table so I can look at all the other records besides the one I am changing/creating. I would like the two (form and subform) to connect in a way, that when I for example move to 5th record in the datasheet subform, that record would be shown in my main form automatically.
At the moment I have it all set in a way, that when I lets say start a new record in my main form, data is automatically updated in the datasheet too, and that is when I change any field in the main form. That way I have live data in both, main and subform - I've done that via
Private Sub Field1_AfterUpdate()
Me.Refresh
End Sub
for every field. And that means that whenever I change any field in my main form, in my subform datasheet the first record automatically becomes in focus because of that refresh.
Form and DatasheetSubform
Any suggestions how to fix that?

Data entry form (search, add, edit, delete) for more than one row - google sheet

Is there a way to work with data entry for more than one row through a form in Google Sheet or a tool to add, search, modify and delete ?
Maybe the dialog form best for my order
First: Save Data button
Add a button in the form to add more than one data entry row at a time before saving
For example, adding more than one product type for a supplier
Second: When searching
Enter the supplier code in the cell (D3) to call all the supplier data rows from input and output
Third: When modification or deletion after the search
Allow selection to modify or delete a row from the called rows
Example Form
Source of the article
Form Proposal

Updating multiple (linked) datasheets on the same subform

I have a navigation form with multiple tabs. Under one of the tabs, I have inserted several datasheets. These datasheets are all related to the same table – they simply display different fields from that table. The reason that I use multiple datasheets linked to the same table is that the table contains many fields, and I don’t want to force my users to enter data into a single “wide” datasheet. An ID column is also present in each datasheet to help the user identify the same record across the datasheets.
When I enter a new record in one of the datasheets, I want that record to be displayed in the other datasheets as well. My problem is that a record entered in one of the datasheets will not instantly be visible in the other datasheets. I have to close the form and open it again, and only then is the record displayed in all of the datasheets.
I tried to solve the problem by inserting a requery statement in the After Update event of the datasheet, but this makes no difference. Any ideas?

Split form columns not displaying correct value

I have a split form set up in Access 2007. In it, I have one combo box to select a school, and the After Update event for this combo box populates a second combo box.
The second combo box selects an item of equipment, and the query associated with it selects all equipment located at the selected school, unioned with the currently selected piece of equipment. (If the school selection changed, the box would turn blank, but actually still hold a value, so I unioned it with it's own current value)
Anyhow, the issue is that the equipment column in the split view only shows equipment values that are associated with the currently selected school as well. For example, if I have a form with schoolA and EquipmentA selected, only equipment also associated with SchoolA will appear in the Equipment column of the split form data sheet. If I change the School column to SchoolB, any rows that were populated with equipment associated with schoolA disappear, and equipment on rows associated with schoolB now show up.
Interestingly, if you click on the school column of the data sheet, this also will update the equipment column to only show equipment related to whatever school was in that row.
To summarize: changing the value of one field in my split form will change what data is displayed in the data sheet portion of the form. Clicking on the fields column in the data sheet has the same effect.
I had the same issue, as you describe. I used a workaround (i.e. used different control instead of split-form)
My Situation:since In the split-form, I was just showing the records, and not allowing users to edit the records in split form. Users could click on any record in split form, which would show in main form, and then could edit. The main purpose of this form was for the users to be able to search for the data in split form and then select and edit.
My workaround : Created a form, where I used text boxes to search, and a list view to show all the columns which were in the split form. On double click event, I added Open the form filtered with the record which was double clicked.

textbox in continuous form populated from different table

I have a continuous form in an access 2010 database that outputs a separate row of data for each customer from a customers_table. The continuous form is for data display only, and no data entry or editing is allowed. One of the textboxes on the continuous form is populated with data that was entered using a combobox in a different form used for data entry. In the textbox on the continuous form, enabled is set to no, and locked is set to yes, so that the textbox is not editable in the continuous form. However, in the separate data entry form, the combobox entered the id for the selection the user chose, instead of entering the text. Therefore, in the continuous form, only an id number is shown, when the user needs to see the text of the specific option which is encoded in that id number.
I think I want to keep the id in the customers data table, in order to retain freedom to make subtle changes in the combobox options later.
So how do I modify the textbox in the continuous form to populate with the textual value associated with the id number? This would seem to involve some sort of SQL like:
"Select textValue FROM comboboxsource_table WHERE comboboxsource_table.ID=textbox.Text"
However, I have no idea where to put this in the Access GUI. The Control Source field in the Data tab of the property sheet for the textbox does not seem to allow this sort of syntax.
If you're not editing the data, put a query behind the form instead of a table. Then, just pull the field you need into the query and VOILA! Problem solved. :o)