Results 1 to 11 of 11
  1. #1
    Join Date
    Nov 2003
    Posts
    150

    Unanswered: Invalid Object Name

    Hi,

    I have a combobox control with an Afterupdate event that uses the DLookup method to fill another control in my form.

    After upsizing, i suddenly get 'Invalid Object Name "Inventory" ' I dont have anything named Inventory in my DB!!! where does this come from?

    thanks!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1

    Re: Invalid Object Name

    Originally posted by MrCrud

    After upsizing, i suddenly get 'Invalid Object Name "Inventory" ' I dont have anything named Inventory in my DB!!! where does this come from?
    Good question. Dig through your code and find what calls it. The db didn't decide to call a mythical object all by itself.

  3. #3
    Join Date
    Feb 2004
    Location
    Washington
    Posts
    49
    I got strange messages like that when upsizing. If I remember correctly, I got that error when I was inserting a new record using a query (view in SQL) where there were more than one table. You see, you can update a view with more than one table involved, but you cannot insert a new record into a view with more than one table.

    One sure way to find out what the real SQL error is is to break your code, copy the query to the clipboard and paste it into SQL and run it.
    Cathy

  4. #4
    Join Date
    Nov 2003
    Posts
    150
    actually, the only thing i can think of is the actual name of the DB itself: Inventory Test . But this doesnt explain much either, because i would expect the error message to return the complete name of the DB....

    any ideas?
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  5. #5
    Join Date
    Nov 2003
    Posts
    150
    actually, i get this error when i try to add a record in a subform ( frmOrderDetails ) which is part of my frmOrder form. frmOrders is based on a table, and frmOrderDetails is based on a Function that calculates the extended prices and subtotal...

    how should i get around this, as this part of my app is pretty important!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  6. #6
    Join Date
    Feb 2004
    Location
    Washington
    Posts
    49
    Yes, one would think it would be the complete name which is why this problem baffled me for a week. Do you use ISQLW? If so, very hand tool to copy the query into and run. You can break the code at the recordsource and in the Vb intermediate window type:

    ?me.recordsource

    when the recordsource is printed, copy it to the clipboard and paste it into ISQLW. After a week of trying everything else, ISQLW gave me what the real error was and I was able to work it out.
    Cathy

  7. #7
    Join Date
    Feb 2004
    Location
    Washington
    Posts
    49
    OK, another really quirky thing I found with sub-forms is that the access application does not like a sub-form with an order by clause. There are ways to work around it (I used a clustered index) and this was a most perplexing problem as most people like to see sorted data.
    Cathy

  8. #8
    Join Date
    Nov 2003
    Posts
    150
    ISQLW???? what does that eat in winter?

    I'm running MSDE 2000, so i have somewhat limited managment tools...

    thanks for the help!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  9. #9
    Join Date
    Nov 2003
    Posts
    150
    I dont need to have anything ordered in this table, so i removed my ORDER BY clause, and it did no improvement....

    This table has a composite key, if that makes a diff ( productID and orderID )
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  10. #10
    Join Date
    Feb 2004
    Location
    Washington
    Posts
    49
    Are you using a view (query) in the sub-form? Is it more than one table and are you inserting a new record?
    Cathy

  11. #11
    Join Date
    Nov 2003
    Posts
    150
    My subform is based on a function, and updates records in a table. My main form is based on a table, and will update that table. So in all, i'm updating 2 tables linked with the OrderID autonumber field ( not sure how that survived the upsize...)
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

Posting Permissions

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