Thank you ITMannie and Jeremy for getting back to me.
I'm embarrassed to say that the problem was my fault. The "No current record" came from the NewInvoices function. I had the recordset MoveFirst without doing the RecordCount so when there is no record in the query, it displays...
Let me clear up the above message I'd just sent.
If the first report has data then everything is working perfectly. If only the second report has data then everything is still working perfectly except the message box "No current record" pops up. The important thing is, in both of...
Hello ITMannie,
Thank you for the suggestion. I placed in the code the 2501 error handling code and it works! The lines of code that follow the print report lines do get call. However, now it shows up the message box "No current record". Do you know how to get rid of it? Besides...
I have a problem with a module I wrote. At a specified set time, the code was supposed to print 2 differet reports. Sometimes one of the report doesn't have any data so it is suppose to skip that report and just print the other report (I set Cancel = true in the NoData event for both of those...
Hello Steve,
Unfortunately your solution is still not running correctly as expected.
To make it easier, I came up with an idea - coding. I created a function so that it goes straight into the Invoice form. I created a new field in the Invoice table with the name PrevPayment. Every time a...
Thank you Steve and cmmrfrds for your replies. Both of your solutions work great. It does return the smallest Invoice Number when no other Invoice Number is smaller than the Invoice Number entered by the user.
However, I still have a related question you might be able to help me. What I was...
I have a parameter query asking the user to enter an Invoice Number. My parameter query is as follow:
Field: InvoiceNum
Table: Invoices
Criteria: In (select top 1 [InvoiceNum] from Invoices where [AccountNum]=[Customers].[AccountNum] and [InvoiceNum]<[Enter Invoice Number] order...
TrojanRabbit, thanks so much! Your code works great after I went in and chose Microsoft DAO 3.6 Object Library like you suggested.
Thanks for your prompt reply and suggestions. You are the best!
This problem has been resolved.
I'm very grateful for your answer to my question. I placed your code in the OnClick of my button. When it got to
rstb.FindFirst, it displays an compile error message saying "Method or data member not found". I changed it to
rstb.Find, which I don't know if it's the right thing to...
Yes, the Invoice Number field for both the INVOICES and the INVOICE DETAILS tables is AutoNumber.
I set it that way so that if I have to enter a new customer with a new invoice, I don't have to keep track of the last invoice number. But if the code you are thinking of does not use autonumber...
I don't have a clue as how to write VBA code let alone write one for this process. Could you please provide the code? Or provide some help on how to write it? Thank you.
I’m trying to create a database that will automatically bill each customer on a monthly basis for services provided by our company.
I have 3 tables: The CUSTOMERS table with Customer ID (primary key), Name, Address, Telephone, etc.; the INVOICES table with Invoice Number (primary key)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.