Hmm. The best I can come up with is:
DELETE FROM Patients WHERE EXISTS
( SELECT TreatDate, PatientID FROM tblTreatment WHERE (TreatDate Not Between #01/01/1999# And #12/31/1999#) AND (Patients.PatientID = Treatment.PatientID) );
This almost works, except that if a patient has no record in...
I get the same results as Skip. Are you sure you used the sql statement exactly as he wrote it? Did you leave out some aspect of the tables' structure?
There must be some reason you're getting different results, and if you left something out (for simplification purposes, or whatever), then...
> SQL="Select count(*) from table1 where (Session = '" & SessionID & "' )"
I notice in your where clause you use apostrophes around the SessionID variable. I know that it isn't necessary to use them with numeric fields, though I don't know if using them would actually cause it to break. You...
Well the reason for the hang almost has to be your while loop. You have it set to exit when rstRPCAhmReport.EOF is true, but I don't see how that's ever going to happen because nothing in your while loop moves the cursor. You might just need to add the line
rstRPCAhmReport.MoveNext
at the...
For the example you've given, simply using Right$(name, 6) will return George. If you want a more general solution, you're going to have to give us some context. Are you trying to make sure that the name variale never contains anything more than someone's first name? Or is it something else?
I recommend taking luceze's suggestion. For one thing, it's easier to code, and much less prone to bugs.
Another thing to consider is that there's no guarentee that a user will enter data in any particular order. Most likely your form is designed well enough that there is an order that is...
Perhaps I'm not understanding the problem, but this may help.
In any module, go to Tools -> Options. Click on the general tab. Under the Error Trapping heading, if Break on All Errors is selected, then any error handling you've built into your program will be ignored.
This is actually a...
How are you having the user enter the range? I'd suggest using a couple of text boxes on a form, and then you can have each report (or the query behind it) look to that form.
If you do this, and you're printing the dates on the reports, make sure the form isn't closed before the reports...
I've managed to get correct results without using the receive dates, but I don't really have a choice about including them. They have to be there, and that's what's been giving me trouble.
Primary keys:
tblCustomer: CustomerID
tblJob: JobID
tblOrder: OrderID
tblReceive: ReceiveID
Relations:
All of the relations are by the keys listed above.
tblCustomer has a one to many relation to tblJob
tblJob has a one to many relation to tblOrder
tblOrder has a one to many relation to...
I have four tables, with the following relevant fields.
tblCustomer
AlphaID
tblJob
JobNumber
tblOrder
QuantityReceived
QuantityShipped
QuantityScrapped
Quantity
tblReceive
ReceiveDate
I would like to create a report that includes the most recent date parts were received (ReceiveDate), the...
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.