Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,097
    My expectation is that lngCurRecID will remain set to the current record ID until such time that the function is complete, certainly until the user replies to the prompt:


    If MsgBox(strPromptMsg, vbYesNo)

    My belief being that the DelTran code is "parked" until the user responds.

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Doesn't alter my comment in previous post.

    I suspect the function called by Conditional Formatting is run before the delTran function in which case the variable is 0. I expect the Conditional Formatting is triggered only when some event takes place, such as opening form or editing a textbox. The fnCurRec function cannot be executed until delTran function is finished, at which point the variable is again back to 0.

    Suggest you have function delTran set textbox instead of variable. Then have the Conditional Formatting refer to the textbox.

    However, the delTran function should be so fast, user will likely see barely a flicker in change of colors as the textbox value is changed during the code execution.
    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.

  3. #18
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,097
    the delTran function should be so fast
    DelTran execution is suspended pending user reply to confirm or cancel transaction deletion.

    See my post #9 wherein I reported the results of using your text box approach.

    While I would assert that the tb value is non-zero during the time the user is being prompted, I don't know now whether Access would even "know" to process Conditional Formatting unless I were to Requery the form.

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I did a quick test. I have all the controls on a form set with Conditional Formatting based on the value of one control - all are bound to fields. I manually change the value in that one control and only that one control immediately changes. All the others don't until form is refreshed. When I programmatically change value in that one control, not even that control changes. So hope that helps clarify capabilities and limitations of Conditional Formatting.
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  2. Conditional Formatting using "Expression is:"
    By TToc2u in forum Programming
    Replies: 1
    Last Post: 07-20-2013, 08:05 PM
  3. Replies: 8
    Last Post: 03-05-2013, 01:20 PM
  4. Replies: 8
    Last Post: 08-05-2011, 02:55 PM
  5. Conditional formatting to, "=sum"
    By AZstudent in forum Reports
    Replies: 3
    Last Post: 11-01-2010, 11:54 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