Results 1 to 8 of 8
  1. #1
    brigitteAT is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2021
    Posts
    61

    how to run 3 different procedures with one dblcklick? (vba-form)

    I have already installed 3 buttons which run three different private functions successfully, if I dblclick them one by one (thus I guess I don't hand over arguments form one to another..)



    1) Private Sub WEGSUinFlundZILIeintragen_DblClick(Cancel As Integer)
    2) Private Sub WEGZuordnen_DblClick(Cancel As Integer)
    3) Private Sub WEGinFJeintragen_DblClick(Cancel As Integer)

    but now - as they seem to work ok - I would like to run these three procedures with just one dblclick

    so I installed butto nr. 4 and tried to find the right syntax to tell access what I want to be done, one after the other....

    4) Private Sub WEGkomplett_DblClick()
    WEGSUinFlundZILIeintragen
    WEGZuordnen
    WEGinFJeintragen

    End Sub

    but it doesn't work that way... and I haven't found any other syntax to do it .. ?!?!?!?!

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    a) you don't need to double click a button. Single is fine.
    b) change the word private to public and see if that works for you. I have only done this a couple of times, so can't recall if you can call as you are doing or if you actually need
    Call WEGSUinFlundZILIeintragen or Call (WEGSUinFlundZILIeintragen)
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    You have to submit the whole names of the procedures:

    Code:
    Private Sub WEGkomplett_DblClick()
        Call WEGSUinFlundZILIeintragen_DblClick
        Call WEGZuordnen_DblClick
        Call WEGinFJeintragen_DblClick
    End Sub
    

  4. #4
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209
    Call WEGSUinFlundZILIeintragen_DblClick()
    Call WEGZuordnen_DblClick()
    Call WEGinFJeintragen_DblClick()
    Last edited by apr pillai; 02-17-2021 at 10:55 AM. Reason: The answer is already posted by another member

  5. #5
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Whoops. Forgot that. I was trying to cover the possibility that the call was coming from another form.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    brigitteAT is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2021
    Posts
    61
    Quote Originally Posted by davegri View Post
    You have to submit the whole names of the procedures:

    Code:
    Private Sub WEGkomplett_DblClick()
        Call WEGSUinFlundZILIeintragen_DblClick
        Call WEGZuordnen_DblClick
        Call WEGinFJeintragen_DblClick
    End Sub
    
    Private Sub WEGkomplett_DblClick(Cancel As Integer)
    Call WEGSUinFlundZILI_Click
    Call WEGZuordnen_Click
    Call WEGinFJeintragen_Click
    End Sub

    thank you so much, it now works !!!! - told me error before, for some "dblclick"-reason, but I'm not sure if this was really the reason, because I found out that it also makes "errors" to simply change the name of the procedure in the VBA-Code ... it only works with letting the system name the function and then copy the code inside....

  7. #7
    brigitteAT is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2021
    Posts
    61
    Private Sub WEGkomplett_DblClick(Cancel As Integer)
    Call WEGSUinFlundZILI_Click
    Call WEGZuordnen_Click
    Call WEGinFJeintragen_Click
    End Sub

    thank you so much, it now works !!!! - told me error before, for some "dblclick"-reason, but I'm not sure if this was really the reason, because I found out that it also makes "errors" to simply change the name of the procedure in the VBA-Code ... it only works with letting the system name the function and then copy the code inside....

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    BTW, using Call is OPTIONAL. This will also work:

    Code:
    Private Sub WEGkomplett_DblClick(Cancel As Integer)
       WEGSUinFlundZILI_Click
       WEGZuordnen_Click
       WEGinFJeintragen_Click
    End Sub
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combining Two Procedures
    By natonstan in forum Macros
    Replies: 3
    Last Post: 08-26-2016, 02:06 PM
  2. Passing strings between event procedures on form?
    By caubetiep1337 in forum Forms
    Replies: 18
    Last Post: 12-16-2015, 02:51 PM
  3. Database for procedures
    By Rabastan99 in forum Database Design
    Replies: 1
    Last Post: 10-19-2014, 10:03 AM
  4. Event procedures
    By GIS_Guy in forum Forms
    Replies: 1
    Last Post: 05-11-2010, 02:34 PM
  5. Help with functions / procedures
    By curnil in forum Programming
    Replies: 3
    Last Post: 03-09-2010, 05:41 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