Solved

Creating a rolodex

Posted on 2004-03-25
6
501 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
  • 3
  • 2
6 Comments
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 75 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 50 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 50

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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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 50

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Insert Into syntax error 10 31
Access vs. Filemaker Pro vs. SQL Server 4 67
error in For & Next statements 4 24
Treeview control in 64 bit Office. 2 23
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

828 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