Using Down/Up Arrow key in combo box to select data without updating the data until hitting tab or enter MS Access - vba

when using a filter while typing in a combo box, the UP arrow key and down arrow key are not useful because once you click down/up the data in the combo box is updating and the list narrows down to only the selected item.
is there a way to select data from the combo list without updating the box itself so the up/down key can be used?
I'm using the following code: https://stackoverflow.com/a/59990955/13522629 , to filter my combo box it is very helpful to filter but I'm having the problem with using the up/down arrow keys.
can anyone help with that.

Probably too late to answer. but just for reference.
I have updated the mentioned answer with additional functionality (for reference) to achieve partial search (you can call it google search or fuzzy search.
As I have been searching for the same question with no answer. it looks like the only way to achieve that is to put a text box above the combo box (they become Ultrabox). then you can manipulate the (highlighted) or selected items and only update the text box when the user hits enter or tab.

Related

How to enable datasheet’s filter triangle button in continuous form

Is it possible to use the built in triangle button to filter records for datasheet form in continuous forms?
If not. Then do you think if it is possible to code such a feature?
Also, is it possible to add a select all button within the datasheet form itself instead of placing it in a form containing the datasheet as a subform?
I’m afraid I have no choice but to use continuous forms because of how limiting datasheet forms are.
No, this is not an available feature. Also, no workarounds are available.
You can add an image with the filter icon and try to determine if the column is filtered, but that's both very difficult and not very useful (since you can't get the dialog to adjust the filter when you click on it).
If you want the filter dialog, however, you can just right click one of the fields to add a filter or adjust an existing filter.

Link Content Control to Legacy Form Field in MSFT Word (VBA)

I'm sure this question has an easy answer, but I have a short timeline and need to get it resolved ASAP.
I'd like to have a content control drop down that when the user makes a selection, will update a legacy text box formField with the selected value.
I have no trouble selecting form fields and setting them using VBA code:
ActiveDocument.FormFields("MyFieldName").Result
But I'm having trouble selecting the value from the content control, and also figuring out how to execute the macro "onExit" like I can with legacy fields / drop downs.
Any suggestions?
Google "vba content control events".
For example, see the last post by Greg Maxey at how-to-catch-custom-control-events-with-vba-macro and towards the bottom of his page http://gregmaxey.mvps.org/word_tip_pages/content_controls.html

How to insert text to QTextEdit according to combo box CurrentText?

In an application I am creating I have a combo box with a list of items and a QTextEdit (read only) below it.
I want to display certain text (it can be a plain text) according to which option is selected. I mean to create a combo box where the user can choose an option and a detailed description (in QTextEdit) of selected option.
How this can be achieved?
For now the only thing I had figured was using the Signal and Slot in Designer and connecting combo box with QTextView and setting currentTextChanged() - setText(). And it works nicely but it just sets the text from Combo Box into the QTextView... and that is not the thing I want.
I am using QtCreator 2.8.1 with Qt5.1.1 on Elementary OS Luna (Ubuntu derivative, Linux).
it coule be easier to connect the QComboBox::currentIndexChanged(int) signal to a custom SLOT in your class.
then use that index on the detailed description list to access the text.
soo long zai
You will need to create your own custom "setText" slot which will the QTextEdit's setText slot with the desired string content.
Basically, you need to have a mapping between the QComboBox options and the relevant texts displayed in the QTextEdit.

Searching through DataGridView

I have a datagridview with three columns (ID, Name, Address). It's bound to a database that contains around 500 items.
I want to be able to search the gridview for data given in a text box, and then highlight it.
If possible, pressing the Next button should find the next match, and the Reset button should clear all selections (nothing highlighted).
Please advise how to do it.
Thank you very much.
Add a search box and search button in the page. OnClick of the search button, search the datatable for the results and keep the result in the session. then on the bound event of grid, highlight the first row of from the search result set (which can be done by matching the primary/unique key of the table).
You have to handle most of code the manually for this. OnClick of next button, highlight the next row from the search result. again traversing of the search result has to handled manually like keeping the track of current result, moving to next result or moving backward etc.
then on click of reset button clear the search result session and bind the grid again without any highlighted rows.
I don't have code to post for you right now. but i hope if you implement this approach surely your problems will be resolved.

Option Group frame: can I add text boxes that are part of the frame instead of rad button options?

Ok so this maybe a simple/silly question but I don't know so here goes:
In access let's say I want to have a frame control, so I click the option group button and add it to the desgin surface. However, I am not wanting to use this as a option group with radio button selection, instead I would like to add text boxes instead the frame, so that when I reference the frame, it references every control instead of it, hence the text boxes, cbo boxes, etc.....just as it would if they were radio option selections.
So can you do this?
I want whatever controls I add inside the frame to be easily referenced (i.e. make all controls visible just by using frameExample.visible = true) so that I can build my own tab control groupings.....
can this be done?
Thanks!
EDIT:
What I am trying to accomplish is having a form that includes a collection of controls (input controls - cbo boxes, text boxes, etc), that serve as the Main record information. These are saved to a table via an INSERT statement on button_click because this form is unbound.
Next I have 8 categories that are relative per each main record (and data that goes along with it). Each of these categories could have a sub form area and a button click that bring it's relative form into the sub form area. These sub forms would be unbound as well as I would just save data via SQL statement. So i know I could accomplish this by running the insert statement from the parent form, on the main collection control's data that would create the KeyID number, then run a SQL statement that would turn around and load that KeyID number right back onto the page in a hidden text box.
Then when I click one of the sub forms and load its relative collection of controls, I could then save that data along with KeyID for each of these sub-forms/tables.
SO......
I was wondering if instead you could define these controls as a collection so that you could hide and make visible all the ones you need on button clicks and avoid the need for additional forms (subs). I know that if a user enters data into a text box, and then somewhere along the way that box becomes hidden, the data still exists in it and still ends up in the SQL statement....
So I want all these controls to exist on the same form, but I thought what is I could encapsulate them into a frame like an option group, then I could call the frame and all the relative controls would be called up (made visible) as needed.
Sorry for the long explanation but I thought it would help.
I do not think you can do it with an Option Group, but what you are describing is pretty much a subform, yesno?
Some examples of hiding the tab control from an app that went live in March 1998:
Tab driven by transparent command buttons over labels styled to look like colored command buttons:
Same approach, more buttons:
In this case, fake colored command buttons don't drive the tab, but insted show/hide the tab and a subform. In this case, the tab is actually driven by the listbox:
A view of when the tab is hidden and the subform revealed. The listbox drives navigation within the subform, which has a visible tab on it:
So, there's a lot that can be done without showing the tab control.