Query to increment value of a field

Did you try to open the 2nd file I attached ? That is saved as 2000 version :)

Sorry did not see it. I was able to open it but I am getting an error. Please see the attached screen shot

Masny Thanks
 

Attachments

  • Error.JPG
    Error.JPG
    29.8 KB · Views: 124
Last edited:
With the databse open, Click on Database tools, Visual Basics and you should see the Module in Design View.

Click Tools, Reference and the "Ticked" References should be showing with the unticked ones below.

I have

Visual Basic for Applications.
Microsoft Access 14.0 Object Library (yours may not be 14.0)
OLE Automation
Microsoft Office 14.0 Access database engine Object Library

If you are missing say the first option then this may explain the problem.

A more experienced forum member may be able to advise further on this I know I had to add a reference when needed.

If nothing obvious, list what you do have ticked.
 
I was actually able to get it working by importing all the objects into a new db

Good news. Lets hope the method and code makes sence and can be edited and copied into your working database.
 
Good news. Lets hope the method and code makes sence and can be edited and copied into your working database.

On this code
Code:
    Set rst = db.OpenRecordset("SELECT tbl_Events.EventID, tbl_Activity.ActivityID AS ActivityReference, tbl_Activity.ReceiptNumber, tbl_Activity.TaxReceiptAmount " & _
        "FROM tbl_Events INNER JOIN (tbl_Activity INNER JOIN tbl_Contacts ON tbl_Activity.ContactID = tbl_Contacts.ContactID) ON tbl_Events.EventID = tbl_Activity.EventID " & _
        "WHERE (((tbl_Events.EventID) =" & EventNumber & ") And ((tbl_Activity.ReceiptNumber) < 1)) " & _
        "ORDER BY tbl_Events.EventID, tbl_Activity.ActivityID;")

I get an error 3061 too few parameters expected 1

ANy ideas
 

Users who are viewing this thread

Back
Top Bottom