Thank you PHV for your replies, this seems to be working perfectly.
I have spent many hours trying to figure this one, you have saved me many more !
Star on it's way !
Kindest regards,
Garry
Hello,
Thank you for your reply - which is very much appreciated.
It must be very close but not quite there.. the rank column shows as '1' for all the results.
The names are all unique.
Kind Regards,
Garry.
Hello,
Thank you for your reply.
Unfortunately the last line of your statement generates an error with 'SELECT'.
On removing 'SELECT', the Query runs but all the States are showing with a rank of 1.
Despite my own best efforts I still cannot get this to work.
Kindest Regards,
Garry
Hello,
I have succesfully used the code below to create basic group headers on a Form from a single Table (Access 2003). It works well.
SELECT
m1.state,
m1.names,
(
SELECT Count(names)
FROM MyTable AS m2
WHERE
m2.state=m1.state
AND...
Hello,
I have hacked some code off the net that I use to open a popup, modal, message box - centrally over a main form, regardless of where that main form is positioned on a screen or on multiple screens... this gets over the 'twips' limitation that exists in multi screen environments.
This...
Hi,
I've hit a small problem:
If I close the database, then re-open it and run the query (above) I see a message:
"The Microsoft Jet database engine cannot find the input table or query 'SELECT ProductID, Sum(ProductQTYadded) AS SumOfProductQTYadded from tblAddProducts GROUP BY ProductID'...
Thanks PHV !!
That produces exactly the same result as the 3 separate queries and was what I have spent hours trying to do!
How did you achieve this and so quickly too?
@ lespaul, the dataset result looks like this (simplified labels):
ID | Product | bought | sold | On hand...
Hi,
Thank you IT4EVR, I tried your suggestion but got a message:
"The number of columns in the two selected tables or queries of a union query do not match".
Any other suggestions?
Thank you.
Garry
Hi,
Is it possible to take 3 simple queries which collectively show stock on hand and merge them into 1 query?
Query 1 sums stock added:
========================
SELECT tblAddProducts.ProductID, Sum(tblAddProducts.ProductQTYadded) AS SumOfProductQTYadded
FROM tblAddProducts
GROUP BY...
Hello,
You might be able to determine your page height and width by using code on the report sections On Format event:
Me.Report.Width = 160
Me.Report.Height = 220 (examples)
with something like:
Me.Report.Left = -15
to offset for margin width (although I havent tried this - it's only an...
Hi,
I think you need a text field as suggested by misscrf, but, make its properties (under Other): Vertical... yes.
Then position it where you need it on the report.
Garry
Hi,
Try this snippet of code in an unbound text box on your report:
=IIf([Pages]>1,IIf([Page]=[Pages],"","continued on next page..."),"")
Regards,
Garry
HI,
Simply place a bitmap image, the same name as your database, in the databases folder.
Then, when someone starts the database up, the bitmsp will be displayed instead of the Access Logo.
Garry
Hello,
This is the code I use to show an error (in addition to a general error trap routine):
Private Sub poSendMail_SendFailed(Explanation As String)
DoCmd.Hourglass False
MsgBox ("The Email Failed: " & Explanation & "." & Chr$(160) & Chr$(160) & Chr$(160) & Chr$(160) & Chr$(160))...
Hi,
Here is a quick example of how I use selectable SQL as a source for a form.
Dim sSQL As String
sSQL = "SELECT qry_history.* FROM qry_history WHERE ((........."
Me.subfrm_6_history.Form.RecordSource = sSQL
By adding different SQL strings I can alter the information that 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.