Results 1 to 1 of 1
  1. #1
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71

    Values of variables ignored in on Format code WEIRD and fatal for me!

    I wanted to thank you for your interest this forum, it has moved me forward. I am afraid I have coded myself into a corner, tho. I would love to send you my db but I don't think the issue can be reproduced without it. It is filled with sensitive data.

    I have a situation where during execution of report on format code, the values being checked are being ignored.



    For example : if place the contents of the value of chkDiscrepSE in a text box on my report, it will contain a "No" (default value) but it actually executes as a yes. Right there on the printed or previewed page. It seems to arbitrarily do this. There is no record with data in it which would cause it to be set to yes for at least a half dozen records following, and this is the first printed result - first record.

    Is there something about report on format code that is weird this way? The value of the chkDiscrepSE variable is set properly every time earlier in the code, but when it hits this spot (and others) it just ignores the value and executes anyway.

    me.text140 = chkDiscrepSE
    If chkDiscrepSE = "Yes" Then
    me.text141= chkDiscrepSE
    Me.discrepSELabel.Visible = True
    Me.discrepSELine.Visible = True

    UPDATE: This can happen randomly during execution. Places where the if's execute properly on one report fail in others.

    UPDATE:
    If I print an individual record and not a group of them, it works fine. I was attempting to use a single print command with a filter. With the subreport attached it fails to accurately process the format event code. Currently I am intending to loop thru a list, issuing separate print commands. If anyone wants to comment on what they think might be wrong here, I'd be obliged.
    Last edited by tstoneami; 08-14-2013 at 12:46 AM.

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

Similar Threads

  1. Code Problems With Variables
    By bidbud68 in forum Programming
    Replies: 6
    Last Post: 01-30-2013, 01:37 PM
  2. Replies: 3
    Last Post: 12-16-2011, 02:37 PM
  3. Replies: 3
    Last Post: 02-08-2011, 11:39 AM
  4. Replies: 8
    Last Post: 09-22-2010, 12:30 PM
  5. Get the sum of decimal values - weird results
    By BengtCarlsson in forum Queries
    Replies: 2
    Last Post: 02-10-2006, 04:29 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