Page 3 of 3 FirstFirst 123
Results 31 to 39 of 39
  1. #31
    Giorgio is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2021
    Posts
    36

    Thanks Vlad, I hoped it would have been easier.
    I shall try to translate what you wrote into plain English (and then into Italian ) over the weekend.

    I thought it would have been simpler to keep the code as it is, as it works very well in granting the choice of "Show Void or not"
    I do not know why this form has a completely different way of working, I mean through VBA and not similarly to the other (orders) one.
    I assume that this is due to the VOID or NOT check, but I really do not have any other clue.

    I actually do not care about the first check, whether there are or not contacts for the selected event, first of all beacuse if we have an event, there should be some contacts, and, in any case, should there be none, the form would open without data. But I can't lose the option of showing or not the VOID contacts.
    Thanks anyway, have a nice weekend

  2. #32
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    I think you will find it easier to do it the way I suggested, post back if you get stuck!

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #33
    Giorgio is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2021
    Posts
    36
    Ok Vlad, the weekend was long and busy.
    I managed to change the Contacts form similarly to the Orders one. Now I have the button on the switchoboard panel opening the combo for the event choice and then a macro will open the form with the selected contacts.

    Below please find the image of the macro

    Click image for larger version. 

Name:	Macro.png 
Views:	18 
Size:	23.9 KB 
ID:	44851
    This is fine but of course it opens all the contacts for the specific event, regardless if the VOID flag is active or not.

    I tried to convert the macro in VBA, in order to add the VOID YES/NO Selection, but it gives me an error (Error opening the macro) so it generates no VBA code...

    so how would I tell the macro to:

    1) ask the question whether I need the VOID or not (Yes/No button)
    2) wait for the Yes / No answer
    3) display the results accordingly?

    Sorry but I got stuck..

  4. #34
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Giorgio,
    I don't use macros. I think you can do this much easier then asking if to include Void or not and changing the record source depending on the answer. On the new selection form below or to the right of the combo add a new unbound check box with a label prompting to add the VOID. Then change the record source of the contacts form to include a reference to that checkbox for the VOID field. Please upload a small db sample if you need help with this.
    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #35
    Giorgio is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2021
    Posts
    36
    I have to confess that I did not choose to use macros or not, the programme did Anyway I tried to build a specific combo form to select the event and then display the contacts. MSKSelezioneFieraContatti , adding there, based on your suggestion, also a checkbox for VOID YES/NO., but it does not work. It works only when i levae it unselected and correctly displays all the contacts, VOID and active.
    I also tried to modify the query that populates the MSKContattiFiera but... I am uploading a small sample for you to check.

    In order not to get mad with the Italian tetxts:
    the Switchboard button GESTIONE CONTATTI opens the form MSKSelezioneFieraContatti (the combo for the event selection) whose checkmark button, after selection,
    opens MSKContattiFiera (the form displaying the contact for the selected event.
    This form has a first upper part with the data of the companies and a second lower part, a subform, which displays the contact data, SUBMSKContatti, which is based on a query named QRYClientiContatti .
    Attached Files Attached Files

  6. #36
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Giorgio,
    Please see updated sample.
    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #37
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    And another file with the combo and checkbox moved to the control panel (switchboard) which already stays open all the time.

    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  8. #38
    Giorgio is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2021
    Posts
    36
    Vlad, still have to decide which one I prefer but i LOVE both! Thanks really, you have been the solution to a big problem for me

  9. #39
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    You're very welcome Giorgio, good luck with your project!
    EDIT: forgot to mention that the second version uses LIKE for the event code so if you leave the combo empty both forms will show all records.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Opening HyperLinks from a Combobox.
    By Torinjr in forum Forms
    Replies: 3
    Last Post: 05-06-2015, 03:27 PM
  2. Replies: 5
    Last Post: 01-24-2015, 12:59 AM
  3. Dialog Form in place of InputBox
    By EddieN1 in forum Forms
    Replies: 7
    Last Post: 04-11-2014, 09:03 AM
  4. Opening form with defined combobox value
    By Kivan in forum Programming
    Replies: 2
    Last Post: 08-10-2012, 04:30 AM
  5. Opening Different Reports on Combobox Selection
    By confusedlilly19 in forum Reports
    Replies: 1
    Last Post: 06-24-2012, 03:46 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