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

x
?
Solved

Creating a rolodex

Posted on 2004-03-25
6
Medium Priority
?
544 Views
Last Modified: 2008-02-26
I need to create a form that is, in effect, a rolodex file.  I am trying to use tab controls with a tab for each letter of the alphabet ... click on the tab to get members whose last name start with that letter.  I think I can do this with a single form used as a subform for each tab but I can't figure out how to pass a parameter (the first letter to filter on) to the subform.

Any suggestions?  I'm sure it's not hard, but I can't find any examples.

Thanks!
0
Comment
Question by:farscape1
[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
  • 3
  • 2
6 Comments
 
LVL 51

Assisted Solution

by:Steve Bink
Steve Bink earned 300 total points
ID: 10679948
Having a tab for each letter is really going to complicate your work.  Here's a basic version of an app I made once:

Create a new form and bind it to your table.  Put on a combo box populated with all the letters in the alphabet.  Build the remainder of the form as usual.  For the combo box:

Private Sub MyCombo_Change()

Me.Filter = "Left([LastName],1)='" & MyCombo.Text & "'"
Me.FilterOn = True

End Sub

You'll also need an entry/button to clear the filter if you want to be able to 'free-scroll' through your rolodex.  When you open the form, it will show the first record.  If you select a letter from the combo box, the form will filter for only records where the last name starts with the letter you selected, and go to the first record in the new subset.  Each time you change the combo, you change the filter.
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 200 total points
ID: 10679996
I did realize this by showing a one character wide (and 26 character high) listbox based on a query like:

select distinct left(namefield,1) from tblAddresses;

Thus only existing first characters will be visible.

This is placed besides a datasheet subform with all addresses and the OnClick event of the listbox can be used to set a filter like routinet demonstrates.

Nic;o)
0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 10680056
Hey nico!  Here you are trying to steal my points...  LOL!  Funny enough that that was a change I made later on to the same app.
0
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
LVL 54

Expert Comment

by:nico5038
ID: 10680216
Hi routinet/ Mi Nam,

Great minds think alike :-)

Certainly not intending to steal point as I already have loads of them. Just thought (like you experienced too) that the listbox approach is more userfriendly, especially combined with the distinct selection from the "real data".

I see you have an extensive profile and much experience, glad to have you aboard !

(BTW check my profile when interested in some Dutch scenic pictures, I guess you're not from Europe:-)

Nic;o)
0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 10680316
Much experience, but all self-taught, so I lack the 'best practices' knowledge alot of you guys have.  I'm still trying to break my habit of recommending DoCmd.RunSQL instead of CurrentDB.Execute. :)  But hey, I know what I know, and am more than willing to know what you know, too!

Don't mind the points...just pokin fun.  And I already checked ur pics.  Dutch scenery makes for outstanding jigsaw puzzles for some reason..
0
 

Author Comment

by:farscape1
ID: 10682215
Thanks to both of you.  These solutions cover it nicely!
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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

688 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