Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2022
    Posts
    17

    Macro doesn't complete routine!

    Hi,
    Tryingto create a Macro that will (if data is not going to be entered) close thisform (Home Policies form), set it back to ‘new’ since the autonumber populated(BinderNumber) when the form opened and return to the Clients form and uncheckthe Home checkbox since there is no longer any data for this client in HomePolicies. Copies attached to try and clarify. I start out on the Clients form,clicking the Enter Home puts a check in the HOME box and takes me to the HomePolicies Form.

    Everything works up to and including gettingfocus on the HOME checkbox (you can notice the faint border around Home), onlyit does uncheck!
    Can anyone tell me what am I missing?
    Thanks for any input.
    Frank



    Click image for larger version. 

Name:	Sample Clients Form.png 
Views:	11 
Size:	24.3 KB 
ID:	49287
    Click image for larger version. 

Name:	Sample Home Form.png 
Views:	11 
Size:	25.3 KB 
ID:	49288
    Click image for larger version. 

Name:	Macro.jpg 
Views:	10 
Size:	125.5 KB 
ID:	49286


  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I read the post at least twice and don't see where you say what the problem is.
    onlyit does uncheck
    I take it that you don't want that? Isn't that the step where you set HomeEntered value to false?

    You should never use spaces or special characters in object names (save for underscore). I would have thought that "Add Clients" would raise an issue.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Instead of SetProperty probably need SetValue. Click the Show All Actions button to get access to this action.

    Are these checkboxes bound to yes/no fields?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Join Date
    Sep 2022
    Posts
    17
    This is how the database started over 20 years ago before we realized NO SPACES. to fix that would take me month! Not the only form or field like that.
    But in case you missed the question? How is the Checkbox unchecked at the end of the procedure!

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    How is the Checkbox unchecked at the end of the procedure!
    By setting its value property to false as already mentioned?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Did you see post 3? It answered your question.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Setting the "value property" value is a valid macro action and it works for me. Makes sense too.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Yep, I finally did testing as well and both actions work.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Macro doesn't work 100%
    By ITVader in forum Macros
    Replies: 28
    Last Post: 11-17-2016, 08:51 AM
  2. Replies: 3
    Last Post: 12-02-2014, 09:38 AM
  3. Replies: 10
    Last Post: 11-20-2013, 04:18 PM
  4. Replies: 1
    Last Post: 05-02-2012, 11:40 AM
  5. Replies: 3
    Last Post: 02-09-2011, 07: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