Report auto todats date and copile error

  • 13 years ago

    Hi all, I have an order entry database. The problem is when I run the invoice button on the order entry form  I get a compile error, cannot find project or library.

    I then get a VB box that comes up showing the fault.
    stDocName = "Invoice"
    stlinkcriteria = "[CustomerID]=" & Me.CustomerID & " AND [Order Date]>=" & Date - 7
    DoCmd.OpenReport stDocName, acPreview, , stlinkcriteria


    Exit_cmdInvoice_Click:
    Exit SubExit_cmdInvoice_Click:
    Exit Sub

    The fault is pointed out is " & Me.CustomerID &" part of the programming.
    If I delete the text between the "" then it continues on and stops at "&Date -7

    I protected the unprotected the database in explorer and compacted the database, Still wont work hmm.
    Any ideas guys would be greatfully received.

    One other thing with this invoice button is that it prints a copy of the order on a invoice. Problem is I get asked for the date to print. I just want it to compose my invoice and have the date in there automatically.

    Any help you can give me would be great.
    Thanks
    Mark



Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann