Page 3 of 3 FirstFirst 123
Results 31 to 34 of 34
  1. #31
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    565

    While I understand you're more comfortable with VB/VBA than SQL, I suggest you don't go there unless you have to. The only time I use VBA (and I used to use it a LOT) was when there was something I couldn't do with regular SQL (well, which can be a bunch given the limits of Access's oddball version of SQL). Most of the time, a SQL statement will be orders of magnitude faster than VBA and recordset messes. That's not to say you never have to use them - sometimes you do, but I'd make sure you really need them before you use them.

  2. #32
    jojowhite's Avatar
    jojowhite is online now Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    434
    i also have my entry using VBA and retrieving Random Players.
    open form1.

    Note the zipped file is an .accdb
    Attached Files Attached Files

  3. #33
    MikeCt is offline Advanced Beginner
    Windows 10 Access 2021
    Join Date
    Jan 2025
    Posts
    35
    The whole reason for taking on this project was to involve myself in learning SQL to do a lot of the leg work. I've seen how fast it is, and I know if I can get more comfortable with using it, I can make future projects better. It has a big learning curve, with a different mindset.

    Not sure what to do with this post, I do not want to close it with a solved status because I'm still trying to understand it all, and to tell you the truth, I truly believe the answers I'm looking for are contained in your answers. I just haven't had enough time to really dig into it all and see how things were accomplished, which is really the whole reason for this. It's been a great project for what I'm trying to accomplish.

    Thanks again for all the help and explanations, they really do help

  4. #34
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    no need to close the thread until you are ready.

    The VBA I provided is annotated with what each section of code is intended to do.

    SQL (at least in Access) cannot be annotated unless you use a different sql editor - but I can explain what each part does if required - just not right now as I am focussed on paying clients.

    Others have mentioned that in their view anyone can be captain and do not need to designate players as captains (or gold/red for that matter). If that is the case then the vba and sql would be much simpler - you are just picking at random a 'player1' and then randomly other players who have not played with that player1 and subsequent members of that team. My version prioritises players designated as captains - then gold and finally red.

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

Similar Threads

  1. Replies: 23
    Last Post: 09-14-2015, 01:34 PM
  2. Replies: 12
    Last Post: 06-06-2014, 01:25 PM
  3. Replies: 4
    Last Post: 01-03-2013, 08:29 PM
  4. Replies: 3
    Last Post: 10-18-2009, 08:38 PM
  5. Replies: 1
    Last Post: 01-31-2009, 10:43 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