Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2000 : Cannot see selected form records (seltop, selheight)

Posted on 2003-12-01
7
Medium Priority
?
1,247 Views
Last Modified: 2007-12-19
I want a form button to process the (more than one) rows selected by the mouse on the record selector at left of form.
However when the button shows me the following (on button Click event):

    MsgBox "form.selheight=" & Me.SelHeight & "  form.seltop=" & Me.SelTop

the SelHeight is reported as zero (as if the selection has lost the focus has been taken from the multple selection) even though I selected 2 or more records.

The same happens when
1/ button Enter event (ie before it has focus) is used
2/ the button is in a subform referencing Me.Parent.sel___ )

Any ideas how my code can "see" the selection ?
0
Comment
Question by:starrynighter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 9852723
Hey starrynighter!

  Have you consider using a Extended Multiselect Listbox for this purpose instead.
  The listbox has a ItemsSelect collection that can be used to accomplish this multi-select processing.

regards
Jack
0
 

Author Comment

by:starrynighter
ID: 9854715
Yes- and I may do, but the appeal of the record selection that I am trying to do is that the data being viewed can be quite long and multi-line per attribute (although I could remove the linefeeds to present it in a list box).
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9855854
On a form the records MUST be selected in a contiguous list.
Your problem is with the change in focus.  Once focus is lost from the subform the .seltop/selheight properties get murky.

With the list box you wouldn't have this issue.

If you only want one line to appear then only select the first 50-60 chrs of the value as the listbox visible value.

A multi-line value is not usually optimal for multiple selection actions.
0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

Accepted Solution

by:
starrynighter earned 0 total points
ID: 9855942
Thanks Jack- I appreciate your points but I have good reasons for wanting to do it this way.

I found the solution at
http://support.microsoft.com/?kbid=208502

The essence of the solution provided is that the .seltop/.selheight values are captured via a "mouse move" event on the button in question BEFORE it gets focus (ie while the selected records are still selected)
0
 
LVL 9

Expert Comment

by:ornicar
ID: 10075547
----------------------------------------------------------------------------------------
This question has been abandoned and needs to be finalized.
 You can accept an answer, split the points, or get a refund (information at http:/help.jsp#hs5)
  If you need a moderator to help you, post a question at Community Support (http:/Community_Support/)

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

ornicar
Cleanup Volunteer

---------------------------------------------------------------------------------------------
0
 
LVL 39

Expert Comment

by:stevbe
ID: 10210333
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question