Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    193
    There is only a small error in what you have done.

    Remove the following line in the After Update event of the Combo Box.

    'Private Sub ComboMemberID_AfterUpdate()'

    Click the build button (...) of the After Update event, which takes you to the code editor.


    The Code is already there with a small error. In the following line remove the space between Square Bracket & ComboMemberID which I have marked in red

    Str(Nz(Me![ ComboMemberID], 0))

  2. #17
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    193
    Remove the following line which you have typed in the 'After Update row' in the properties of the Combo:
    'Private Sub ComboMemberID_AfterUpdate()'
    Click the Build Button (...) and select 'Code Builder' of the pop up form and click 'OK' to enter into the code editor. In the following line of the code, remove the space between the square bracket and C, which I have marked Red:
    rs.FindFirst "[MemberID] = " & Str(Nz(Me![ ComboMemberID], 0))

    Alex

  3. #18
    DDave is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    10
    I made the changes and the error went away. However, when I open the form the following happens:
    Member 1 is displayed.
    I type 3 in the combo box.
    Member 2 is displayed.
    I type 1 in the combo box.
    Member 3 is displayed.
    I close the form.
    I open the form.
    Member 1 is displayed.
    I click on the down arrow in the combo box.
    I select 3 and press enter.
    Member 2 is displayed.
    I select 15 and press enter.
    Member 3 is displayed.

    I have zipped to file again and am attaching it.
    Thank you for your help in advance.

    If you have time to re-read my initial post, what I really want is an open field where I can type a member number, and have that record be displayed. Maybe the combo box will work like that, but I don't need or want a scroll down box. I can just highlight the member number in the form and hit page down to get to the member record. However, with about 300 records, it takes quite a few seconds to get to the correct member.
    Actually, I sort the members on last name and scroll down to the last name.

    Thank you, again

  4. #19
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    193
    Instead of ID you can display the name in the Combo. Start typing the Last Name in the combo. On typing a few letters, the matching name will appear in the combo. Then you can select the required Member.
    To accomplish this do the following:

    ComboMemberID Property Sheet:

    Click Data tab

    Remove the SQL in the Row Source and paste the following SQL.

    SELECT Members.MemberID, [Members]![LastName] & ", " & [Members]![FirstName] AS Name FROM Members ORDER BY [Members]![LastName] & ", " & [Members]![FirstName];

    Click the Format tab of the Combo property and make the following changes:

    Column Count: 2

    Column Width: 0";1.5"

    List Rows: 30

    List Width: 1.5"


    Now you can select the required member by Last Name. You also widen the Combo width, so that you can see the name in full.

    Alex

  5. #20
    DDave is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    10
    I did as suggested.
    Results:
    Load project
    Open Members Dues Paid - MemberID 1 displayed
    Click on combo box - White, William press enter
    Displays correct record.
    Click on combo box - Doe, Joe press enter
    DIsplays Smith Virgil

    Don't know why.

    Attached is ZIpped project.

    Thank you very much for your help.

    Merry Christmas and Happy Holidays
    Dave

  6. #21
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    193
    What you have done shows correct results. After typing few letters, when the matching record appears, just press Enter and the data will change.
    Alex

  7. #22
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    193
    Thanks for the greetings. I also wish you a Merry Christmas and Happy Holidays.
    Instead of typing, you can also browse and select a name.
    Alex

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. contional open a form and enter data
    By tggsun in forum Forms
    Replies: 4
    Last Post: 12-08-2011, 03:48 PM
  2. Replies: 6
    Last Post: 06-17-2011, 04:39 AM
  3. Using composite keys to enter data in a form
    By kymmyg in forum Database Design
    Replies: 2
    Last Post: 09-08-2010, 01:20 PM
  4. Replies: 3
    Last Post: 04-07-2010, 11:25 AM
  5. can't enter data in some form fields
    By ashiers in forum Forms
    Replies: 1
    Last Post: 09-18-2008, 12:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums