Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    So you need to decide if the control need to be locked depending on whether the user did a Cancel/Close or not, correct? In other words you need to pass back to the first form the fact that the user wants to cancel this process, right?

  2. #17
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    Pretty much.

  3. #18
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Set a value in the next form and then go invisible. When the code gets back to the first form, check the value in the other form and act accordingly and then close the other form.

  4. #19
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    I'll give that a go when I get in tomorrow.

  5. #20
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Let us know how you make out.

  6. #21
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    So ended up just throwing some code on the cancel button to change the control properties to the desired value.


    One more quick question:

    All of this is for salesperson payroll entry. There is a combo box with the salespeople. Is there and easy bit of code that will cause all of the controls on the entry form to go to their default values (mostly zero's) upon changed the selected salesperson? AfterUpdate is already requerying a subform and that works great. Obviously I can just add each control in the code and set it to zero, but there are ~30 controls....

  7. #22
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    Nevermind!
    Code:
    For Each ctl In Me.Controls
     If ctl.ControlType = acTextBox And ctl.Tag = "y" Then
     ctl.Value = ctl.DefaultValue
     End If
    Next
    That did the trick. I just put a "y" in the tag field of the controls that I wanted to reset. All bueno!

  8. #23
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Very cool...

  9. #24
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Glad to hear you got everything sorted. Happy New Year.

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

Similar Threads

  1. Replies: 6
    Last Post: 12-03-2013, 02:59 AM
  2. Changing control property
    By mujaqo in forum Programming
    Replies: 2
    Last Post: 05-23-2013, 09:41 AM
  3. Replies: 1
    Last Post: 04-12-2013, 07:56 AM
  4. Replies: 4
    Last Post: 02-09-2013, 09:26 AM
  5. Control properties for Menu Command
    By Pam Buckner in forum Access
    Replies: 1
    Last Post: 10-20-2011, 01:49 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