Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    On current conflict (Access 2000)

    How can i avoid the conflict with the OnCurrent event? In the OnCurrent i have a requery Me.ListOffers.Requery which does not allow to close the form properly.For example, if i go to client 19 in the attachemnt applied by me, and try to close the form, i get an error.How can i avoid it ?

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

    Re: On current conflict (Access 2000)

    I cannot reproduce the problem: the form closes correctly. What is the error you get?

  3. #3
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On current conflict (Access 2000)

    Thank you for the reply.If i try to close the form through the black arrow at the beginning, then it is all right.However if i go to the record number 19, which is client metropol M and then try to close the form through the black arrow,then i get the message "Enter parameter value Forms!frmClients!clientid".

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

    Re: On current conflict (Access 2000)

    I don't get an error when I do that. Try removing the line

    RunCommand acCmdSaveRecord

    It is not necessary, for Access will save the record automatically if necessary.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On current conflict (Access 2000)

    Thank you for your reply.When you open the form you must click on the right hand until you reach number 19.Only then you must click on the black arrow and then you will get the message parameter value.Perhaps,to avoid the conflict,how can i give the command to go to the first record, where there are no conflicts and just then close the form ?

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

    Re: On current conflict (Access 2000)

    As I have stated before, I do NOT get an error when I do EXACTLY what you describe.

  7. #7
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On current conflict (Access 2000)

    Dear Hans,
    Since i get this question for the parameter value on my computer when i go with the hand on the next records, and not on the first record, perhaps i could evade that by going back to the first record and then close the form.What is the command to go back to the first record? After that i might put the line for closing the form.What do you think ?
    P. S. I have established that if i delete the line Me.ListOffers.Requery from the OnCurrent event, then i have no problems.

    Peljo

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

    Re: On current conflict (Access 2000)

    It shouldn't be necessary, but you could use this:

    RunCommand acCmdRecordsGoToFirst

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

    Re: On current conflict (Access 2000)

    I have sometimes had problems with these "spurious parameter prompts" when closing a form.

    One solution that had worked on occasions for me is this.

    First make sure that the control that provides the parameter for the query is unbound (rather than bound as yours is) , then explicitly set its value to null in the event that closes the form.

    In your case the combo box for finding customers is unbound and also holds the clientID, so if you synchronised that with the current record you could use that for the query parameter.
    Regards
    John



  10. #10
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On current conflict (Access 2000)

    Thank you very much for your reply.I manage to avoid the problem this way, but only when i make two buttons.I cannot do it with one button .For example
    RunCommand acCmdRecordsGoToFirst
    DoCmd.Close acForm, Me.Name
    However if i have one button with RunCommand acCmdRecordsGoToFirst and then another button with DoCmd.Close acForm, Me.Name then it works.Why is it so?

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

    Re: On current conflict (Access 2000)

    See if johnhutchison's suggestion works.

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

    Re: On current conflict (Access 2000)

    I don't know if this will help (I did not have a problem with the original) , but I attach an example with my suggestion in place.
    Regards
    John



  13. #13
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On current conflict (Access 2000)

    Tahnk you so much.it was a great help

Posting Permissions

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