Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: alphbetical tabs (Access 2003)

    Simplest way is to create 26 queries each sorted with the criteria Like 'A*' or Like 'B*' etc and then place them on each tab

    or are you looking for something else?
    Jerry

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: alphbetical tabs (Access 2003)

    Not sure if this is exactly what you are looking for, but this code will filter a list of names, using alpha buttons, and no queries.

    For this I have an option group consisting of twenty six buttons. They display A...Z but their value is 1.. 26. Chr(Me.OPTALPHA + 64) works out the letter value of each button.

    Private Sub OPTALPHA_AfterUpdate()
    Dim strfilter As String
    strfilter = "[Bsurname] like " & Chr(34) & Chr(Me.OPTALPHA + 64) & "*" & Chr(34)
    Me.Filter = strfilter
    Me.FilterOn = True
    End Sub
    Regards
    John



  3. #3
    rlbroerman
    Guest

    alphabetical tabs (Access 2003)

    Typo in subject corrected by HansV to help future searches

    How do I pull names from a list names using tabs on a form each with one letter of the alphabet?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: alphabetical tabs (Access 2003)

    See <post#=189,484>post 189,484</post#>, it has an attachment (in Access 97 format, but it can be converted to Access 2000 or 2002/2003 format without problems) that demonstrates the approach mentioned by John Hutchison. No queries needed.

  5. #5
    rlbroerman
    Guest

    Re: alphabetical tabs (Access 2003)

    HansV, Itried this and it sidn't seem to post. ASo here it is again.
    The Tabs Application works great, thanks a bunch.
    I made some changes and addad a "Print Record" button but now the tabs don' t work and neither does the "Print Recoerd " button. I want to be able to click the "Print Record" button and view only the highlighted record only without entering "DeaconeeID" or "customerID" Can you help please.
    Rick B
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: alphabetical tabs (Access 2003)

    There is no After Update code for the group box in the form footer, so the buttons don't do anything. I added the code in the attached version.

    The DeaconessID field is a text field, so you must put quotes around it in strCriteria.

    Finally, the report was still grouped on CustomerID (in the Sorting and Grouping window), but this field does not exist in your patients table. I changed it to DeaconessID, moved the text box to the detail section and set the Group Header property to No.
    Attached Files Attached Files

  7. #7
    rlbroerman
    Guest

    Re: alphabetical tabs (Access 2003)

    HansV,
    Thank you so very much. You are a great help. You are amazing. I have spent
    hours trying to solve these problems and couldn't get anywhere Tou seem to solve the so quickly. Thanks again for your help.
    I am an Electrical Engineer and only dabble in Access ( as I
    am sure you can tell). I have numerous Access books and use
    the Knowledge Base, but can never seem to find the answers. I love to work with Access and am elated when something
    actually works. Thanks again for the help.
    I am a husband, father, and grandfather, close to retirement.
    How about tell me something of yourself. I would really like
    to know about you.
    Rick B

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: alphabetical tabs (Access 2003)

    The Access forum is not really the place for personal stuff, but here is a little bit about myself:

    I'm a 54 years old Dutchman. After studying mathematics, I taught maths in high school for 9 years. After that, I've held various positions on the edge of, but not really inside, IT.

    I love listening to all kinds of music - classical (both old and new), jazz, rock, Indian classical. I love reading too, but don't get round to it enough recently.

    I live in the beautiful historic city of Leiden in the western part of The Netherlands. I'm single, of course - how else could I spend so much time in the Lounge? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    What do I look like? Below is my avatar in Myst Online - Uru Live...
    Attached Images Attached Images

  9. #9
    rlbroerman
    Guest

    Re: alphabetical tabs (Access 2003)

    I have a new problem, please help.
    You showed me a long time ago how to o this and I used it on another database and it worked great. I have now tried to use it on a new batabase and I can't get it to work. I want to be able to input a soc sec no or name and have the other come up also. Could you look at the and tell me what I have missed?Thanks in advance for your help.
    Rick B
    Attached Files Attached Files

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: alphabetical tabs (Access 2003)

    If you use spaces and punctuation in the names of fields and tables, you must put square brackets [ ] around the name in expressions, VBA code and SQL statements. (This is a good reason for *not* using spaces etc. in names). So

    SELECT tblPatients 2-11-07.Soc Sec No, tblPatients 2-11-07.LastName, tblPatients 2-11-07.FirstName, tblPatients 2-11-07.MiddleInitial FROM tblPatients 2-11-07;

    as Row Source of the Soc Sec No combo box is not valid, it should be

    SELECT [tblPatients 2-11-07].[Soc Sec No], [tblPatients 2-11-07].LastName, [tblPatients 2-11-07].FirstName, [tblPatients 2-11-07].MiddleInitial FROM [tblPatients 2-11-07];

    and similar for the others. By the way, the name of the query in your database is "qryPatients 2-11-07" (without the quotes), not "qryPatients 2-11-07 Query".

    Also, you hadn't taken into account that "Soc Sec No" is a text field, not a number field. See attached version.
    Attached Files Attached Files

  11. #11
    rlbroerman
    Guest

    Re: alphabetical tabs (Access 2003)

    Hansv,
    This works except that it puts soc sec no into firstname in table.
    Help??
    Rick B

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: alphabetical tabs (Access 2003)

    Sorry, I left some incorrect code in the form module. In the attached version, I've cleaned up the control names and adjusted the code.
    Attached Files Attached Files

  13. #13
    rlbroerman
    Guest

    Re: alphabetical tabs (Access 2003)

    Thanks for your patience. It now works great.
    Rick B

  14. #14
    rlbroerman
    Guest

    Re: alphabetical tabs (Access 2003)

    I need some more help. See attached.
    Visit form and subform work great together but medication form and medication subform don't work.
    The medication records work in the subfoerm alone but not when the subform is in the main form. Can you help, please.
    Rick Broerman
    Attached Files Attached Files

  15. #15
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: alphabetical tabs (Access 2003)

    The input mask for Soc Sec No in the patients table is
    <code>
    000-00-0000;0;_
    </code>
    The 0 in the middle argument means that the slashes are stored in the field. But the input mask for Soc Sec No in the medication table is
    <code>
    000-00-0000;;_
    </code>
    The lack of a 0 in the middle argument means that the slashes are *not* stored in the field if you enter the Soc Sec No directly in the medication table or in the medication subform by itself. As a result, the patients table contains 111-11-1111 and the medication table 111111111. These don't match.
    You can see this by temporarily removing the input mask.
    However, if you enter a medication record in the subform on the mainform, it'll take the Soc Sec No value from the main form, so they will automatically match.

    For best results, change the input mask for Soc Sec No in the medication and visits tables. You will have to redo the Soc Sec No.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •