Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
  1. #16
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740

    Quote Originally Posted by Welshgasman View Post
    Dave,
    Unnecessary requiries perhaps, but it was looking at the form controls, but why was Me.requery failing, when it was still shown in Locals?
    Don't know. I just replaced the me.Requery with a new assignment to me.recordsource which makes requery redundant.
    That was just one of about a hundred various changes to make the DB usable.

    Note: In Post#14, the V1 database upload may have been corrupt. It has been replaced with a V2 database upload.
    Last edited by davegri; 11-18-2024 at 02:49 PM. Reason: Added Note

  2. #17
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Hmm, I even tried me.recordsource=me.recordsource and still got the error message, so well done.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #18
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    but why was Me.requery failing, when it was still shown in Locals
    I think I answered that? Immediate window will tell you the name of a loaded form but apparently trying to set a checkbox to "" raises that runtime error. Does that error make sense for that situation? I'd say no. Do all Access errors make sense? No again.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #19
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by Micron View Post
    I think I answered that? Immediate window will tell you the name of a loaded form but apparently trying to set a checkbox to "" raises that runtime error. Does that error make sense for that situation? I'd say no. Do all Access errors make sense? No again.
    Yep, changing all "" to Null gets it working.
    You can learn something new every day.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #20
    MustbeAweful is offline Novice
    Windows 10 Access 2021
    Join Date
    Nov 2024
    Posts
    21
    Quote Originally Posted by davegri View Post
    It's unclear how the Emergency, Backup and Helper choices would fit into the searches in a business logic sense.
    Holy crap! I did not expect anyone to be doing this much work on editing my database. Thank you!

    To give you some clarity:
    I work at a private charity that feeds the homeless and precariously housed. My job is to organize meal delivery. Think of me as the organizer of those who can't afford Meals On Wheels.
    My problem has been keeping up with the intense amount of information I have to deal with on a daily basis, whether that be from clients or volunteers. This database is a quick view of volunteer drivers' differing exceptions and availabilities. "Emergency" means a volunteer I can call same day if another driver cancels, "Backup" means someone I can call days prior, and "Helper" means that they need an assistant with them for deliveries. I find that sites like Better Impact, which takes into account thousands of volunteers, does not give me the detail I need to work as efficiently as I need to, nor is it at all useful in case I can't come to work and someone needs to cover my shift.

    This leads to my drivers... I have quite a few. I only put 8 drivers in the database to test the framework of my programming. I have currently ~40 regular and backup drivers. Some change with the seasons, so the list is going to be vast between the inactive and active.

    You've done wonderful work that goes right over my head. I taught myself how to do this to make my job easier, but a lot of this is stuff I can't get from a YouTube video. If I may go into a concern I have when it comes to the search of the thing:

    Click image for larger version. 

Name:	Error.jpg 
Views:	39 
Size:	29.8 KB 
ID:	52424

    I get this error when I type the start of a name and hit ENTER. My solution would be to go into the query and go: LIKE "*" & [blah!][blah!][blah!] & "*". What would you do? And how can I optimize this for my purposes?

  6. #21
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    I have never programmed a button as <ENTERL> default for a form. Too many other things can be happening and unexpected results can happen. I removed that functionality.
    I have programmed the dropdown to happen in the search combobox as soon as you click into it. Then if you scroll and click on a row in the dropdown, the search occurs. No need to hit ENTER. There is no need to type into the combobox.
    The pink background indicates that the driver is inactive.
    I added a listbox to more easily see the results of the search. You can double click on a name in the listbox to get the edit form.

    Driver Database-davegri-v03.zip

    Click image for larger version. 

Name:	DriverDB.png 
Views:	36 
Size:	31.0 KB 
ID:	52426

    Click image for larger version. 

Name:	listbox.png 
Views:	36 
Size:	43.3 KB 
ID:	52427

  7. #22
    MustbeAweful is offline Novice
    Windows 10 Access 2021
    Join Date
    Nov 2024
    Posts
    21
    Good day,

    Sorry for taking so long to get back to you. I can be a fairly busy lady.

    I downloaded the zip, and I think the one you uploaded is incomplete because it doesn't have a query. Also, the active/inactive colour use is all awash of pink. I would love to tinker around with it in the way that you've shown in the images. I'm trying to keep an open mind about scrolling for names... Is it possible to make the scrolling for names descend based on active/inactive, so that the active volunteers are close to the top?

    Lastly, how did you get this good? I'd love to be able to learn all of this myself.

    EDIT: Oh... I thought you needed a query in order to do a search. Is there a way to automatically search after update? Buttons are fine, but I like to use them as little as possible.

  8. #23
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Also, the active/inactive colour use is all awash of pink.
    It isn't clear if this is a problem.

    Is there a way to automatically search after update?
    Can you be more specific about what this means?

    Is it possible to make the scrolling for names descend based on active/inactive,
    I'm assuming you are referring to the combobox dropdown. Yes, the IsActive checkbox can be added to the rowsource sort as well as displaying in listbox.

    I'd love to be able to learn all of this myself.
    It's like learning to play the piano. Practice, practice.

    Click image for larger version. 

Name:	sortact.png 
Views:	32 
Size:	60.5 KB 
ID:	52434
    NA for not available.
    Last edited by davegri; 11-25-2024 at 12:28 AM. Reason: added image

  9. #24
    MustbeAweful is offline Novice
    Windows 10 Access 2021
    Join Date
    Nov 2024
    Posts
    21
    Quote Originally Posted by davegri View Post
    It isn't clear if this is a problem.
    At the starting point, when the search is cleared and you just have the continuous forms, all of the drivers are in pink regardless as to whether they're active or not.
    I would like to have it that only the inactive ones are in pink. More over, it would be great if the active drivers are always at the top. Can all inactives be cast below the actives?

    Similarly, if the names in the combo box are done in this way, then it would reduce any confusing calls I might make. Preferably active/inactive represented as colouring the name in consistency with the colouring of the continuous forms.


    Quote Originally Posted by davegri View Post
    Can you be more specific about what this means?
    No problem! Originally, I wished to construct the database so that search can happen on ENTER. If that is a no-go, then I'd like to have it that any changes to the search area are automatically searched, rather than having to hit a button. Example: I'm looking for a driver for Wednesdays/Thursdays in an Emergency. As soon as I check the Wednesday box it searches. It refines again when I hit the Thursday box to whittle down all unapplicable drivers. Then refines it in finality when I check off Emergency.


    I hope this all makes sense.

  10. #25
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    At the starting point, when the search is cleared and you just have the continuous forms, all of the drivers are in pink regardless as to whether they're active or not.
    I would like to have it that only the inactive ones are in pink. More over, it would be great if the active drivers are always at the top. Can all inactives be cast below the actives?
    I had to remove the pink inactive functionality. It depended on the form's current_event. That event does not fire when scrolling through a continuous form.

    Then I'd like to have it that any changes to the search area are automatically searched, rather than having to hit a button. Example: I'm looking for a driver for Wednesdays/Thursdays in an Emergency. As soon as I check the Wednesday box it searches. It refines again when I hit the Thursday box to whittle down all unapplicable drivers. Then refines it in finality when I check off Emergency.
    This is the behavior in V5. It actually makes the search button redundant, as the search is done with every search term's after_update event.
    Attached Files Attached Files
    Last edited by davegri; 11-26-2024 at 01:01 PM. Reason: more info

  11. #26
    MustbeAweful is offline Novice
    Windows 10 Access 2021
    Join Date
    Nov 2024
    Posts
    21
    This is great! I have noticed a few odd things, though:

    1) When I click on a few days (eg. Wed/Thurs/Fri) and then select a name, the name selected does not go to the top of the continuous form. (example in photo)
    Click image for larger version. 

Name:	Error 1.jpg 
Views:	26 
Size:	137.2 KB 
ID:	52446

    2) I can no longer double click on the continuous form to bring up the DriverDetailsF. I can in the little window in search. But the wrong DriverDetailsF come up. (example in photo)
    Click image for larger version. 

Name:	Error 2.jpg 
Views:	26 
Size:	114.2 KB 
ID:	52447

    3) What does this do? (Pic below) I can't seem to type in it, and the arrows do something but it's not altogether clear how it organizes things.
    Click image for larger version. 

Name:	What is this.jpg 
Views:	26 
Size:	5.1 KB 
ID:	52448

    Forgive me for taking up so much of your time on this. Unfortunately, once the programing is over my head, I'm a bit dependent on you. Hope you're okay with that. If it makes any difference, I think we're almost there.

  12. #27
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740

    I think V6 addresses the issues.

    The Button structure in question was to replace the default navigation buttons. To reduce complexity, I removed them and returned the defaults.

  13. #28
    MustbeAweful is offline Novice
    Windows 10 Access 2021
    Join Date
    Nov 2024
    Posts
    21
    So far, this is running great!

    I'm going to tinker with it for a bit. Fill it with my info. If I notice something I will come back to you.

    You've been a great help to me

  14. #29
    MustbeAweful is offline Novice
    Windows 10 Access 2021
    Join Date
    Nov 2024
    Posts
    21

    Okay, tinkering done.

    Driver Database-kelly-v7.zip

    Hello again,

    It's been a little while (holidays were very busy). I think I have finished my tinkering and have done the following:

    • Squeezed it a bit so that it can be more compact to fit at one side of the screen, allowing for the other side to show the Excel-made scheduler
    • Added a drop-down box for phone numbers that is not tied to the database
    • Added a section for Regular Shift
    • Added a section for Regular Assistant
    • Added a drop-down box for whether they are a Driver, Assistant, or Versatile


    Things I don't know how to do but could really use:
    • Making the drop-down box for Driver/Assistant/Versatile searchable. I couldn't understand how to do that with the method you used
    • For all inactive volunteers to be very obviously so, such as turning their entry in the search red. Reason for that is that confused workers covering me have called inactive drivers before and I want to prevent that from happening again.


    Are you interested in helping me one last time?

  15. #30
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Making the drop-down box for Driver/Assistant/Versatile searchable. I couldn't understand how to do that with the method you used
    For all inactive volunteers to be very obviously so, such as turning their entry in the search red. Reason for that is that confused workers covering me have called inactive drivers before and I want to prevent that from happening again.
    First about drop down, I don't understand what you mean to be searchable.
    As far as color, I already indicated that a continuous form cannot be selective in that way. All the records will have a common background color or control color or whatever.
    However, the DriverDetailF is a different story. And it's where the phone numbers are, so it makes sense to show the color there. To do so, add this code to DriverDetailF
    Code:
    Option Compare Database
    Option Explicit
    
    
    Private Sub CloseB_Click()
        DoCmd.Close acForm, Me.Name
    End Sub
    
    
    Private Sub Form_Current()
        If Me.chkIsActive = False Then
            Me.Section(0).BackColor = 12758005
            Me.Section(0).AlternateBackColor = 12758005
        Else
            Me.Section(0).BackColor = 8965045
            Me.Section(0).AlternateBackColor = 8965045
        End If
    End Sub

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

Similar Threads

  1. Replies: 3
    Last Post: 01-25-2024, 02:46 PM
  2. code for clear button is not working
    By tommyried in forum Programming
    Replies: 3
    Last Post: 03-13-2014, 02:50 AM
  3. Button to clear a record, not working
    By snipe in forum Forms
    Replies: 3
    Last Post: 02-17-2014, 02:23 PM
  4. clear fields button not working
    By fainterm in forum Forms
    Replies: 20
    Last Post: 02-04-2014, 01:13 PM
  5. Replies: 2
    Last Post: 08-03-2013, 03: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