Results 1 to 2 of 2

"Run-time error "50290": Application-defined or object-defined error"

  1. #1
    BayEnder is offline Novice
    Windows 8 Access 2007
    Join Date
    Feb 2013
    Posts
    2

    "Run-time error "50290": Application-defined or object-defined error"

    Hi Guys,

    I was wondering whether anyone had come across the above issue before?

    I've got a database that basically writes the data stored in the various tables/queries to an Excel template using VB code. However when I run this I'm getting an error message of:

    "Run-time error "50290": Application-defined or object-defined error"

    appearing on various statements where I'm writing to fields in Excel, for example it randomly stops on any of these statements:

    Code:
                  If ((IsNull(myRec.Fields("OOS")) Or myRec.Fields("OOS") = False)) Then
                    xlSht.Cells(rowNo, "B").FormulaR1C1 = myRec.Fields("Inc No") 'Inc
                    xlSht.Cells(rowNo, "C").FormulaR1C1 = myRec.Fields("App") 'App
                    xlSht.Cells(rowNo, "D").FormulaR1C1 = myRec.Fields("First") 'First
                    xlSht.Cells(rowNo, "E").FormulaR1C1 = myRec.Fields("Closing") ' Closing
    It's strange as I can go into debug mode and press the run button and it'll skip past and complete the rest of the script.

    So effectively I'm getting the results I want I'm just getting these annoying error messages when I run it.

    Does anyone have any ideas?



    Thanks

  2. #2
    dr91075 is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2013
    Posts
    22
    I'll have to see more of the code to determine where the problem may be. Can you post the preceeding parts?

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

Similar Threads

  1. Replies: 1
    Last Post: 12-14-2012, 12:32 AM
  2. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  3. Replies: 1
    Last Post: 02-22-2011, 06:10 AM
  4. "Too many fields defined" error
    By Matthieu in forum Queries
    Replies: 1
    Last Post: 01-28-2010, 08:55 PM
  5. Error: "User-defined type not defined"
    By mastromb in forum Programming
    Replies: 10
    Last Post: 01-08-2010, 02:57 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
  •  
Tech Forums: Microsoft Office Forums