Try it like this...
select [UNIT NUMBER], [DATE OF MAINTENANCE], [MILAGE]
from (select [AUTO MAINTENANCE].[UNIT NUMBER] as TopUnit, Max([AUTO MAINTENANCE].[DATE OF MAINTENANCE]) as TopDate from [AUTO MAINTENANCE] group by [AUTO MAINTENANCE].[UNIT NUMBER]) AS Tops
inner join [AUTO MAINTENANCE]...
Sorry, I screwed up.
Try this instead...
---------------
select [UNIT NUMBER], [DATE OF MAINTENANCE], [HOURS]
from (select [UNIT NUMBER] as TopUnit, Max([DATE OF MAINTENANCE]) as TopDate from [LIFT TRUCK MAINTENANCE] group by [UNIT NUMBER]) AS Tops
inner join [LIFT TRUCK MAINTENANCE] on...
It's not as difficult as it might look. All you need to do is start a new query as normal, but don't add any tables in design view. Move across to the SQL window and then paste in the above SQL statement.
Where it says 'YourTable' in the SQL, type in the name of your table (if your table name...
Paste this into the SQL window and save it. Then base your report on the new query. (You'll need to change YourTable to your table, and UnitNumber, Date, Miles to match your fields)
-----------
select UnitNumber, date, Miles
from (select UnitNumber as TopUnit, Max(date) as TopDate from...
I understand that the listbox is populated automatically, but, normally, no item within the listbox would be selected until the user clicks something in there. So if no item is selected in the populated listbox, the textbox should be empty. And it should remain empty until such a time as a...
Not sure I'm with you, but if I am...
Wouldn't it be better to clear the textbox on open, so when you open the form, nothing is selected in the list box (as happens anyway) and nothing is selected in the text box?
If not, then I guess the way you'd do it would be: In the Open Event, select...
There may be a few dirty records in there. Try copying the table (data-definition only) and starting again.
If that doesn't work you might want to try (you might want to do this anyway) changing the autonumber field to a regular number field and setting up a function that gives you the next...
Okay
The reason I use a string called strSQL is that I have a function set up that returns the result of a record-call (like I showed you above), I just pass it a string (called strSQL) and (with a bit of coaching) it returns me what I want.
You don't really need the strSQL part, you could...
Paste this into the SQL window and then flip back to QBE(you'll first need to change the table name to fit)
SELECT First(Person) AS Person99, GroupID, Sum(Sales) AS SumOfSales
FROM Table1
GROUP BY GroupID;
Here's the idea you want; you'll need to tart it up a bit though.
--------
Sub Whatever()
Dim x as integer
Dim strSQL as string
Dim dB as Database
Dim Rec as Recordset
x = InputBox("Enter Number")
strSQL = "select count(ProjectNumber) from ProjectList where ProjectNumber =...
Hi there,
From experience (from which I've since moved on)...
The first thing you've got to accept is that there are going to be things that need fixing - maybe lots of things. Proper testing of your dB depends upon your ability to manage the process fault finding and subsequent fault...
Hi
Unless I'm missing something, it just sounds like regular run of the mill dB stuff.
Something like this should do the job
--------
Sub Whatever()
Dim intColor as integer
Dim strSQL as string
Dim dB as Database
Dim Rec as Recordset
intColor = txtColor
strSQL = "Select...
Hi
Unless I'm missing something, it just sounds like regular run of the mill dB stuff.
Something like this should do the job
--------
Sub Whatever()
Dim intColor as integer
Dim strSQL as string
Dim dB as Database
Dim Rec as Recordset
intColor = txtColor
strSQL = "Select...
Sabavno
Here's the SQL, you just need to change the table name (assuming you have a Yes/No field type rather than text that says 'yes' or 'no')...
-------------------
SELECT Transit, Sum(IIf([USRoaming]=True,120,100)) AS Charges
FROM tblExample
GROUP BY Transit;
-------------------
I'll just...
If you can't receive opposing ideas without becoming over-emotional, you shouldn't enter into debate. Sneering comments are not appreciated - others have expressed the same opinion.
Quit talking down to people, lose the arrogant tone and lighten up.
AutumnBlues
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.