Would I use the .seltext as in ctrl.seltext? I don't believe that is an option.
Would I use the .seltext as in ctrl.seltext? I don't believe that is an option.
Never tried SelText before in a combo but I saw it in another thread. If we are talking about comboboxes then.... I created a combo and a control button. In the control button's click event I placed...
Me.Combo5.SetFocus
Me.Combo5.SelText = "12"
Me.Combo5.Dropdown
It was in intelisense in Access 2010. Seems to give the effect the OP is looking for.
Actually, it does run, but it doesn't just highlight, it selects that option.
I decided to go with the route of using the .dropdown function. I am unsure if the direction I am looking to go is clear or not.
Say I enter a combobox that is null at the moment, it will automatically run .dropdown. If the first key I press is the up arrow, I would like it to highlight the final option. Whereas if I press the down arrow, it would highlight the first option.
I do not want to actually select the option, just highlight it. I do not know if this is possible or not.
Now SelText is showing up. Think I was accidentally referencing a listbox in my code test.
However, not sure you want it. From Access VBA Help:
The SelText property uses a string expression that contains the text selected in the control. If the control contains selected text when this property is set, the selected text is replaced by the new SelText setting.
I tested it and it with an unbound combobox and it simply populated the box with 12 and replaced whatever was already there.
I believe highlighting IS selecting. That's the way combobox works.
Page Down goes down one page at a time and Page Up goes up one page at a time.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Ya I tested it a couple times and I agree, it does not seem to me that what I am looking for is an option.