Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Would you please try this one and let me know if that is right?
    Cheers,


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

  2. #17
    kishino is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    14
    Quote Originally Posted by Gicu View Post
    Would you please try this one and let me know if that is right?
    Cheers,
    Vlad
    Thanks alot for your help again. its works just right .

  3. #18
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Great to hear, good luck with your project!

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

  4. #19
    kishino is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    14
    Quote Originally Posted by Gicu View Post
    Great to hear, good luck with your project!

    Cheers,
    HI Gicu,

    I need your help again regarding an improvement to the current macro as currently it only accepts one input for the frequency spec. can we make it such that it accepts 2 inputs example (-2 ,-4) and it will do the pairing between this range of frequency spec starting with -4 then -3 then -2?
    Click image for larger version. 

Name:	input.png 
Views:	35 
Size:	4.7 KB 
ID:	42628
    current input by users

    example of 2 inputs by users outcome result, it will pair with the -4 first then -3 and then -2. another example would be like user input (-1,1) so it will pair -1 then 0 then 1 which will be in this case of using 385 khz as example would be 384 then 385 then 386. is this possible for having user input 2 values and we do the pairing according to the range of the values? thanks again for the help . do let me know if you need more information.
    Click image for larger version. 

Name:	example.png 
Views:	35 
Size:	15.9 KB 
ID:	42629

  5. #20
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Please have a look and let me know if that is what you wanted. Enter ranges like this: -4,-2
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #21
    kishino is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    14
    Quote Originally Posted by Gicu View Post
    Please have a look and let me know if that is what you wanted. Enter ranges like this: -4,-2
    Hi Gicu,

    Sorry for the late reply, it seems the logic is abit different after i tested. below is an example of the output that should come out of the ranges .

    If enter the range -4,-2
    It should pair in a way like below
    It starts with 374khz but as there is no frequency with quantity to pair within the range of -4,-2 it will skip it and move to the next frequency which has quantity.
    Click image for larger version. 

Name:	2020-08-16 22_50_35-Document1 - Word.png 
Views:	27 
Size:	34.8 KB 
ID:	42679

    Next available frequency with quantity would be 378khz. So doing the first number of the range which is -4 we would get 374khz which we are able to pair up thus minus the quantity for 374khz which will become 0 and 378khz left with 1 quantity. As for the range -3 it would be 375khz but there is no quantity available this it will skip and move to range -2 which is 376khz which also has no quantity available for pairing thus the pairing for this frequency 378khz is finished with remaining 1 qty.
    pic1
    Click image for larger version. 

Name:	2020-08-16 22_51_46-Document1 - Word.png 
Views:	28 
Size:	166.7 KB 
ID:	42680

    Next it will move to 379khz and try to pair with -4 range which is 375khz with no quantity thus skip and move to -3 range which is 376khz with no quantity and skip to -2 range which is 377khz which is also no quantity thus ends for this frequency pairing for 379khz
    pic2
    Click image for larger version. 

Name:	2020-08-16 22_52_21-Document1 - Word.png 
Views:	27 
Size:	171.0 KB 
ID:	42681

    Next frequency in line will be 380khz. For range -4 will be 376khz with no quantity thus skip, range -3 will be 377khz with no quantity thus skip too, range -2 will be 378khz which has quantity 1 left as we can see from pic 1 thus able to pair up with 380khz.
    pic3
    Click image for larger version. 

Name:	2020-08-16 22_52_54-Document1 - Word.png 
Views:	26 
Size:	181.1 KB 
ID:	42682

    So now we have 2 successful pairings. One is 378khz with 374khz and 380khz with 378khz. It should continue pairing until there is no more available frequency.
    Click image for larger version. 

Name:	2020-08-16 22_53_33-Document1 - Word.png 
Views:	26 
Size:	180.6 KB 
ID:	42683

  7. #22
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Please have a look at the code to see what I did. It simply does the entire pairing on all the integers in the range you enter just like it did before. So first it does the -4 (for all records), then it resets the quantities and does the -3 and finally -2. I added the "Input" field to both detail and summary tables so you know which iteration match the pair. Are you saying that you want instead to check for each frequency all items in range (first -4 then -3 then -2) without resetting quantities between values?

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

  8. #23
    kishino is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    14
    Quote Originally Posted by Gicu View Post
    Please have a look at the code to see what I did. It simply does the entire pairing on all the integers in the range you enter just like it did before. So first it does the -4 (for all records), then it resets the quantities and does the -3 and finally -2. I added the "Input" field to both detail and summary tables so you know which iteration match the pair. Are you saying that you want instead to check for each frequency all items in range (first -4 then -3 then -2) without resetting quantities between values?

    Cheers,
    Vlad
    Hi Vlad,
    Yes what i mean is that it will check each frequency all the items in the range without resetting the quantities between the range values. so for example each frequency example 378khz it will go through the -4 (374khz) then -3(375khz) then -2(376khz) if there are quantities available it will pair with 379khz and minus the quantity like it did before. after it finishes the range -2 it will then loop and move to the next frequency in line without resetting the quantities which is 379khz and repeat the loop again of range -4(375khz), -3(376khz),-2(377khz) and so on.
    Last edited by kishino; 08-17-2020 at 10:56 AM.

  9. #24
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Please have a look now. I am not sure I get what you want. Initially it was looping from the input to 0, (so if you entered 3 it will look for 3 then 2 then 1), and now you want it to stop at the end of the range (so for -4,-2 would do -4 then -3 then -2 and stop, not go all the way to 0).

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

  10. #25
    kishino is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    14
    Quote Originally Posted by Gicu View Post
    Please have a look now. I am not sure I get what you want. Initially it was looping from the input to 0, (so if you entered 3 it will look for 3 then 2 then 1), and now you want it to stop at the end of the range (so for -4,-2 would do -4 then -3 then -2 and stop, not go all the way to 0).

    CHeers,
    Hi Vlad,

    Yes seems like in the right direction already. but the data outcome is kinda short or it miss one one the freq to pair up. i did it manually with the range (-4,-2) and the output pairs should be like below.

    Click image for larger version. 

Name:	2020-08-21 21_43_46-pairing output.xlsx - Excel.png 
Views:	17 
Size:	8.9 KB 
ID:	42777

    from your module it comes out like this instead. its skipping some of the pairs in between if you compare the 2 outputs.i edited the file so that it starts from the highest freq then it pairs downwards.

    Click image for larger version. 

Name:	2020-08-21 21_44_03-Access - pairing_Aug_20_2020 _ Database- C__Users_ALVIN_Desktop_pairing_Aug_.png 
Views:	17 
Size:	10.9 KB 
ID:	42778

    pairing_Aug_21_2020.zip

  11. #26
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi, please try this one and let me know, I think it matches your manual example.

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

  12. #27
    kishino is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2020
    Posts
    14
    Quote Originally Posted by Gicu View Post
    Hi, please try this one and let me know, I think it matches your manual example.

    Cheers,
    Vlad

    Hi Vlad,

    I tried it and it works good the outcome is like what my manual example shows. Thanks so much again for the help. Much appreciated

  13. #28
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Glad to hear, good luck with your project!

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

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

Similar Threads

  1. Assigning a position based on quantity
    By chestnuthill in forum Programming
    Replies: 6
    Last Post: 02-13-2020, 12:38 PM
  2. Allocate quantity per team based on member count
    By critusodem in forum Access
    Replies: 4
    Last Post: 07-25-2016, 11:44 AM
  3. Replies: 3
    Last Post: 02-09-2016, 04:36 PM
  4. Pairing records from excell
    By Jen0dorf in forum Access
    Replies: 6
    Last Post: 07-29-2015, 03:42 AM
  5. Large Quantity Of Data
    By dr4ke in forum Queries
    Replies: 3
    Last Post: 01-18-2013, 11:19 AM

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