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........
Related
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.
I have a continuous form which displays an overview/summary of my data. A user can select a row and click a button I created in the footer to open another form which has all the detail for that particular record and be able to edit it. This works fine. However I would also like for certain fields to be editable from the continuous form. I enabled two fields I would like users to edit directly (One is a combo box selection and the other a text box) When users click the combo box for any record it works fine and they can go back to the same record and select another value if they wish. All great but the text box behaves rather differently - The text box will allow the user to initially enter a value but after entry the box appears disabled and the only way to change the initial data entry is to go into the detail form which still works. Why can't users change the text box from the continuous form after an initial entry?
I found the issue!
There was a conditional filter on that particular field
I'm trying to create a simple test program in Gtkada to bring up a Dialog box upon leaving a specific textbox. I have managed this part, but am having problems resetting the focus back to the original textbox when the Dialog's 'Ok' button is pressed.
The general idea is that the user enters something into a textbox and when they click/tab out of the box (focus out event), some simple Alphanumeric validation is done. If the validation fails, the user is warned with a Dialog, and focus is returned to the textbox they entered erroneous data into.
All I am after is a simple example of how to set the focus back to a textbox when you close the Dialog box which clicking out of the textbox originally called. In Gtkada... I'm using version 2.2 of Gtkada. I can't change the version of Gtkada, or use a different program or language!
Much obliged!
Tim
The most elegant solution, GUI-wise, is to do the validation on a leave_event on each input field, and if that fails display an error message (in red or some such) next to the field. But do not display a dialog or force the focus to a specific field, that would interfere with what the user is trying to do (imagine: I enter an incorrect email address, press tab, get the dialog which I do not read (like most users), start typing my name for the next field, but since the focus went back to the email address, I have no overridden that one and lost my previous input).
If you still want to grab the focus, Gtk.Widget.Grab_Focus is the procedure you want.
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).
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.