Advertisement

03.25.2008 at 11:02AM PDT, ID: 23267949
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Listview & TextBox, using Up/Down arrow keys
Tags: Access 2003 vba
I am using a text box and a listview control on a form.  The user selects an item from the listview to edit, this populates the text box with the text that can be edited.  As soon as the user selects an item, the focus shifts to the text box so that the user can easily edit the text.  I can get the up/down arrow keys in the listview to work but only after the user edits the text in the textbox and then hits Enter.  The down arrow key also works if you just hold it down, but the up arrow key doesn't work unless you hit enter from the text box.  Can I make the up/down arrow keys functional from the text box?  For example, I select an item in the listview, the focus shifts to the textbox, I make the text change and then, instead of pressing Enter, I press the down arrow key to move to the next item.
Start your free trial to view this solution
Question Stats
Zone: Microsoft
Question Asked By: dkcoop03
Solution Provided By: harfang
Participating Experts: 1
Solution Grade: A
Views: 133
Translate:
Loading Advertisement...
03.25.2008 at 12:48PM PDT, ID: 21205405

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.25.2008 at 01:31PM PDT, ID: 21205838

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.25.2008 at 01:38PM PDT, ID: 21205902

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.25.2008 at 07:51PM PDT, ID: 21208550

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
03.25.2008 at 12:48PM PDT, ID: 21205405

Rank: Wizard

I don't really see the purpose (don't you edit directly within the list view?) but you can automate such a control from the outside. The following assumes you have a ListView variable lv pointing to your control.

Hope this helps!
(°v°)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyDown And Shift = 0 Then
        If lv.SelectedItem.Index < lv.ListItems.Count Then
            lv.ListItems(lv.SelectedItem.Index + 1).Selected = True
            Text1 = lv.SelectedItem.Text
        End If
        KeyCode = 0
    ElseIf KeyCode = vbKeyUp And Shift = 0 Then
        If lv.SelectedItem.Index > 1 Then
            lv.ListItems(lv.SelectedItem.Index - 1).Selected = True
            Text1 = lv.SelectedItem.Text
        End If
        KeyCode = 0
    End If
End Sub
Open in New Window
Accepted Solution
 
03.25.2008 at 01:31PM PDT, ID: 21205838
I'm new at this and would rather edit directly from the listview but wasn't sure how to do it.  Some of the columns in the listview should not be editable and some should depending on what options are selected beforehand.  I'll try your code and let you know how it goes.  I do have one other question however, in my listview I can scroll down through the listview by holding down the down arrow key just fine, but the up arrow key just sits there.  This functionality is done without any special code.  Is this something that's built into the listview control?
 
03.25.2008 at 01:38PM PDT, ID: 21205902

Rank: Wizard

> As soon as the user selects an item, the focus shifts to the text box...

Given this "feature", none of the arrows should work more than once, and I thought this was the exact problem you were facing. I'm afraid I don't understand.

(°v°)
 
03.25.2008 at 07:51PM PDT, ID: 21208550
I probably wasn't realy clear.  The listview works in the following way right now with no special code.  The user selects an item from the listview, the focus shifts to the textbox, the user types and hits Enter, the AfterUpdate event is called, some stuff is done & the focus goes back to the listview.  The user can then use the down arrow to select the next item and do the same thing.  He can use the up arrow also -- the same the down arrow was used previously.  In addition, with no special code, the user can use the down arrow and continuously scroll through the listview, so he can just hold the down arrow down and it keeps scrolling, but the up arrow doesn't work that way.  I was wondering if this is the way the listview is designed.
 
 
03.26.2008 at 06:06AM PDT, ID: 21211147
It's not designed that way; the user can freely scroll down and up using the arrow keys. However, your design is that the focus keeps switching over to your text box, so any navigation should immediately stop...

You say say that without any coding, when the user selects an item (how btw? double-click or something similar?), the text box receives the focus. There must be some code doing that, or am I missing an integrated feature here?

(°v°)
 
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628