Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    error 2427 in a report (Ms Access 2007)

    In my report rprtDeleveries i have the following code in the On Format event of the detail section
    If Nz([txtNalev]) <> 0 Then
    txtNalev.visible = true
    txtNalev.FontBold = true
    txtArtnr.FontBold = True
    TxtQty.FontBold = true
    Else
    txtNalev.visible = False
    txtNalev.FontBold = False
    txtArtnr.FontBold = F alse
    TxtQty.FontBold = true
    End if
    That must , when appropriate,make it possible to give the reader of the report a special sign when the qty that is to be delivered isn't complete and a backdelivery will be arrange later.
    Most of the case all works fine, but now and then i get a error 2427 pointing to the first line in the code hereabove ; If nz(txtNalev )<> 0
    A close look to the orderitem in question that has to be printed, i can't see any difference with the ones that works fine.
    PS: The code makes part of a database that is upgraded from MS access 2.0 to MS Access 2007.
    Running the same code with the same data in MS Access 2.0 don't result in such a error.
    What can be the reason ?

  2. #2
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: error 2427 in a report (Ms Access 2007)

    I think you want is:

    If NZ([txtNalev],0) <> 0 then
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  3. #3
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: error 2427 in a report (Ms Access 2007)

    I tried your suggestion, but that didn't solved the problem. After i documented the code i showed you, i got another error message, telling me that the problem must be located in a global function, namely RoundUP. This function accepts two parameters, namely the number that must be rounded, and the number of decimal places to be rounded.
    In my reportfooter i have some code that calls this routine, but i can't found out where i call this routine for the txtNalev. I'll try futheron..
    Speeking about problems:
    In order to select the orderitems that has to be contained in the deliveryreport, i use a form with two textboxes. One textbox (should always) contains the orders that result from a query that serves as rowsource for this textbox, and are the items of which a selection has to be made.
    I say should always, because this in not always the case. I put in the load event of the form the necessary code to requery this listbox, but that didn't solved the problem.
    Because the form just get hidden en not closed when hitting the close button, i thougt this was the reason why the requery didn't help, because the event load doesn't happens again by reopening the form. So i placed the code also in the On Open event of the form, but also this doens'nt fix the problem. What to do to get the listbox always shows immediatly the changing in the result of the query that serves as rowsource of this listbox?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: error 2427 in a report (Ms Access 2007)

    What causes the results of the query to change?

  5. #5
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: error 2427 in a report (Ms Access 2007)

    I would check to see if any data is found. This message can be generated when no data is found for a report. Try canceling the report in the No data Event to see if this error stops.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  6. #6
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: error 2427 in a report (Ms Access 2007)

    The oders that didn't be delivered are candidate's or a deliveryreport. When a new order is entered it isn't always delivered the same time. So new orders that are entered have the ield 'delivered' set on NO. and that is a condition to make this order part of the result of the query. When new orders of this type are entered and i open the form more then once, then i can get the new order in the listbox.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: error 2427 in a report (Ms Access 2007)

    Reposted in <post:=748,185>post 748,185</post:>. This thread is locked to prevent further duplication.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •