Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Listclicking problem (MS ACCESS 2003)

    I have an event of a list click. If I click on the list, code is run which includes a query to fill another list. It works okay. However if I click on the list and use the up/down keybord arrows it halts displaying a notice -

    The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing Microsoft Office Access from saving the data in the field.

    There is nothing in either of the mentioned events, and nothing is being saved? its just finding records.
    If the arrow keys are moved slowly theres no problem.

    Code for the listfill that gives the problem is:

    MySQL2 = "SELECT AthleteNames.AthleteID, AthleteNames.Athlete, AthleteNames.Country, "
    MySQL2 = MySQL2 & " JUNCTION.ID2, AthleteNames.SportorSports AS Sport FROM AthleteNames "
    MySQL2 = MySQL2 & " INNER JOIN JUNCTION ON AthleteNames.AthleteID = JUNCTION.AthleteID "
    MySQL2 = MySQL2 & " WHERE (((JUNCTION.ID2)=[forms]![Mainform1]![Subform1].[form].[ID2])) ORDER BY AthleteNames.Athlete;"

    Me.AthleteList = ""
    Me.AthleteList.RowSource = MySQL2

    If I rem this out the problem goes. I tried putting DoEvents in different places but it does not cure it.

    Hope its not a Service Patch 3 issue.

    Regards

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

    Re: Listclicking problem (MS ACCESS 2003)

    What happens if you change the line

    Me.AthleteList = ""

    to

    Me.AthleteList = Null

  3. #3
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listclicking problem (MS ACCESS 2003)

    Hi Hans, trust your well. No, changing to Null does not do it. It was originally Null but I'd chenged it to "" thinking it might have cured it. The earlier code on the event sets the subforms it placed on's recordset, followed by a DoEvent, thinking one event operation was colliding with the next. I could set the focus somewhere else after a listclick, but that takes away the users ability to scroll the list. Thanks

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

    Re: Listclicking problem (MS ACCESS 2003)

    I'm afraid I can't offer further help without seeing the database. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  5. #5
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listclicking problem (MS ACCESS 2003)

    Thanks Hans. Unfortunately the database is too large to reduce in size. It would take hours to remove parts of it to be still active. I think I have inherited so many problems since going from Access 97 to Access 2003, it seems each time there are bugs. I recently installed service patch 3, and now wonder if thats part of the problem. Before XP with Windows 98 I always had a backup partition with alternatives to check back with, however XP has killed this ability. Feel like throwing it out of the window. I still have my flashing listbox problem. Because I could not reduce the database I was unable to attach that. I certainly am not going to jump to Access 2007 in a hurry. Many thanks again

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

    Re: Listclicking problem (MS ACCESS 2003)

    The problems I had with Access 2003 SP3 appear to have been solved with the Access 2003 post-Service Pack 3 hotfix package: December 18, 2007. If you haven't installed that already, I recommend you to do so.

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

    Re: Listclicking problem (MS ACCESS 2003)

    Does it work better if you change the line

    MySQL2 = MySQL2 & " WHERE (((JUNCTION.ID2)=[forms]![Mainform1]![Subform1].[form].[ID2])) ORDER BY AthleteNames.Athlete;"

    to

    MySQL2 = MySQL2 & " WHERE JUNCTION.ID2=" & Me.ID2 & " ORDER BY AthleteNames.Athlete;"

    (I assumed that ID2 is the name of the list box being clicked)

  8. #8
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listclicking problem (MS ACCESS 2003)

    Hi Hans. Thanks for the info on the MS Patch link, I installed the Service Pack 3 through Windows Update so presumed any other fixes would have been done. I think I have found what my problem was, as after the AthleteList query had been run I had a DoEvents statement. When I removed it the problem went away, so could it be the DoEvents crashes on a fast list scroll action.

    The ID2 is the subforms underlying primary key, not the list.

    Anyhow many thanks again for all your help, have a good weekend. Regards

Posting Permissions

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