call a function when navigating to next or previous record in MS access - forms

I have a split form and when the user navigates through the records in the datasheet using the standard arrow on the bottom I want to be able to call a VBA function I wrote to populate a listbox in the top part of the form. Is there a way of doing this?

Try to use Current event.
The Current event occurs when the focus moves to a record, making it the current record, or when the form is refreshed or requeried.

Related

How can I get an edit request for full row when in readOnlyEdit and fullRow mode?

I want to have my AgGrid editable and want to run validation logic before a row is saved. So, basically when a user clicks the cell, enters into edit mode, edits a few cells, clicks away - the row is SAVED (unless validation fails).
I started with setting
editType="fullRow"
readOnlyEdit
on AgGrid. This allows me to get multiple onCellEditRequest events when I click away from the row (=save the row). But ideally I want to receive single event with all edited cells (or a full row data).
Is it possible? Can I request this feature on AgGrid?
You can use the onRowValueChanged callback. This will be called once you save any changes within the row.
Documentation.

Access 2016 Prevent "change" event from firing

I have a combo box in an Access form with 2 values Yes / No. The user opens the form and enters the reference number and pushes a button to run a macro. The macro executes a query to return data based on the reference number. The results of query are displayed in various text boxes.
After the combo box is built, the macro selects the appropriate value based on the query. The problem I'm having is that the "change" event is triggered because the combo box is loaded for the first time. I want to prevent this.
After reviewing the data, the user can choose to change the value in the combo box. At this time, I want the change event to fire because the additional macros are run that update multiple tables in the database.
Can I prevent the "change" event from firing when the form is loaded with data but allow it to fire when the combo box is changed?
Thanks in advance for any help or suggestions you provide........

Create a navigation window in Access

I'm looking to create "Welcome" window of sorts for the database I'm working on. The window would have four buttons. My current issue is with a button that I want to use to open a form I've already created.
The trick is this form is meant to be the input window to a table, so I don't want the form to come pre-populated with any data, it would (if completed) create a new record, but only once the form is completed.
Opening the form isn't the trouble (DoCmd.OpenForm "form name"), what I'm not sure is how to have it open blank.
DoCmd.OpenForm "form name",,,,acFormAdd
This opens the form to a "new" record.
If the form is bound to a table, then you can open it to a "new" record but that record is added to the database as soon as the first value is input. This doesn't fit your requirement of the record being added "only once the form is completed".
If the form is unbound, it's technically already on a blank record but you would have to create some event to save that record to the table. That event could be the OnClick event of a button, or the AfterUpdate event of a required field (although the OnClick event of a button is probably the proper method 99.999% of the time).

Microsoft Access How to refresh the parent form from the subform

I know this question has been ask thousands of time, but I couldn't find a direct answer for this problem.
I am a programmer, but I never bothered learning VBA since this is only a small project I am doing on the side. I would prefer only using macro's.
I currently have a parent form inside a navigation menu, which has a datasheet table which display all the information about all the customers.
http://i.stack.imgur.com/d3TdM.png
In this parent form, I have a button to allow the user to add a new customer which opens a pop up form.
http://i.stack.imgur.com/RDSvq.png
I want the save button in this pop up form to update the parent form onClose. I know the record is working since if I switch off to a different tab and come back to it. I can see the new record added to the table.
Put this on the form frm_addNewCustomer on close event
Private Sub Form_Close()
[Forms]![TheFormYouWantUpdated].Refresh
End Sub

Editing Records with MVVM/MVVM-Light

I have created a very simple wpf app with mvvm light.
I have rows in a list view, these are templated representations of Book objects.
I can click a row, then click an edit button, this button loads a new window and sends the new window the book to edit (using mvvm-light's Messenger).
The issue I have is when I edit the record in my new window the data on the main form is updated. The text boxes are bound to the object received via the Messenger.
I know this is because I have essentially passed a reference to the same Book object around the place, therefore I update in one place.. and voilĂ  it updates on the main page too.
What I would like to know is.. is there a standard way/method/concept to achieve what I am trying to do? i.e. create an "edit" page/screen with the option of discarding the edits?
thanks.
Could you make your entity implement ICloneable and create a clone for editing?