Select a row in a group with a column that has the maximum value
I have the following recordset:
5F453674-DA64-4BB1-8947-19493439927B 1 CamCard Beta 1
5F453674-DA64-4BB1-8947-19493439927B 2 CamCard
EB70E4BD-CC44-4AD0-A000-6DD92CD44740 3 Business Cards
Column names are as follows:
Column 1: ProductID
Column 2: VersionNumber
Column 3: ProductName
I need to write sql that will return only the highest version number
for each product. So using the sample data, only records 2 and 3 would
be returned. I can't figure out how to do this. I believe it has
something to do with grouping and possibly the Max fu...a new drawing not erase previous drawing?
visual studio c++ 6.0, mfc, graphics
in my program a new drawing erases previous drawing. How to manage that all
that is drawn stays alive on the window? And is not erased when the window
is covered by another window, as well. And that the image does not
Those last two have from time to time appeared in my attempts to solve the
first problem. And that I didn't manage at all - make the first drawing,
then the second, see them both at the same time on the window.
I have tried the following and maybe more: Invalidate(false),
InvalidateRect(false), override OnEraseBkgnd, ...Selecting a large number of rows, but not all
I have a spreadsheet with almost 10,000 rows that I am going to do a lot of
sorts and subtotals on. I want to be able to start near the bottom row but
not the absolute bottom one and and select up to almost the top row but not
the absolute top. Aside from holding down the left mouse button and waiting
for it to scroll up all of the rows, is there a shortcut other than "select
all" to start at one row and have it select everything between that and
another row in one quick step?
maybe this idea will help. Modify to suit
X = InputB...how to draw a bitmap transparently?
I have an owner draw button associated with a bitmap. In the bitmap
editor, I turn off the option "draw opaque" for the bitmap. That is, I
make it transparent. However, the the bitmap's background color still
shows up on the button. The bitmap has only a solid circle in the
middle. What else do I have to do? Please help. Thanks.
One thing you can do--and this works only for some restricted cases, which you may or may
not have--is to make the button background 192,192,192, and when you LoadImage, you
specify LR_MAP3DCOLORS. It will change the 192,192,192 to...Select a specific row in named range
I need to select the second row in a named range ("Overviewfinal") and
insert copied rows so that the named range expands to take the new data.
I tried the following, but got an error??
Could someone tell me what I've done wrong & how I should do this?
Thank for your help
"BeSmart" <Be...Macro to Sort automatically when file/save is selected
I have a shared file that is being used by some rather inexperienced Excel
users. This file will expand with extended use as each user enters their
data. In order to make it easier for them to use, I'm trying to automate some
Is there a way... and I'm sure there is, I'm just not experienced enough to
know how... that I can have my file automatically sort on a particular column
when the user goes to save it? I'm thinking that this must be either a macro
or VBA or whatever, but I am rather a novice in this area.
Open the ThisWorkbook module, and use the BeforeSave...Deleting Blank lines with VBA
Help I have a macro that runs multiple formulas. However, when the formulas
finished I am left with about 64000 blank lines. I am unable to insert a
row on the
worksheets as I get a Run-Time Error 1004 (Try to locate the last Nonblank
Here is a same of some of the formulas I am running ( the macro is very
ActiveWorkbook.Names.Add Name:="TrunkFormulaI", RefersToR1C1:="=Trunks!R1C27"
ActiveWorkbook.Names.Add Name:="TrunkFormulaJ", RefersToR1C1:="=Trunks!R1C28"
ActiveWorkbook.Names.Add Name:="TrunkFormulaK&qu...Secondary Axis Grid lines
Is there a way to show grid lines for a secondary y-axis?
They've added this is 2007, which has so far only added to the confusion. It
makes no sense to have two sets of Y axis gridlines, so set up the chart
with the gridline-requiring data on the primary axis.
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
"Arun" <Arun@discussions.microsoft.com> wrote in message
> Is there a way to show grid lines for a second...owner draw CListBox, how to draw "no item found"
I have an owner draw listbox, in the DrawItem I draw the items.
If the listbox doesn't contain any item I would like to display a message
"no item found"
but this is no item, so DrawItem is the wrong place.
Where should I do this? OnPaint, OnEraseBkgnd?
I thought I would be able to do something like this for a test (just paint
the window blue)
but it's always white
BOOL CmyListbox::OnEraseBkgnd(CDC* pDC)
if (m_pItemList.GetCount() < 1)
return TRU...Selecting values in rows
I have the following problem:
I have a lot of sheets with measurements on different dates and times
dates and times in different columns. The problem is that not all tim
series are the same, some measurement are every 30 minutes and som
every hour. so some are like 01:00, 02:00, 03:00, etc and others ar
00:30, 01:00, 01:30 etc.
All i want to do for now is:
I want to create 1 main sheet with the following content
2 columns with dates and times (smallest time step of course)
a lot of columns with the measurement..
so excel would have to do:
Look in main sheet what time and date are asked for...Creating Form, Need 1st 2 lines of field to indent, 3rd to wrap
I'm creating a form for myself to enter into. I have lines that are
formatted in what they call "Indented Block" - I have a heading on the left
margin, which I don't touch when filling in the form, the field starting at
an indent of 3", the 2nd line of the field if it's long enough to wrap to
also be at 3" and any lines after that to wrap back to the left margin.
Kinda like this:
2nd line of field
3rd line of field continued
BUT, I need to be able to indent the 3rd line also to 3" if it's too short &...Cannot select a cell or range
I have a couple of large workbooks that have the same problem. When a
cell is clicked the contents is displayed in the formula bar but the
cell is not selected, no black line around etc. There is no crash
according to the task manager but I can only close it using the task
manager. If I open the worekbook using the repair option it is ok for
a short time then the same happens again. Any suggestions gratefully
It sounds like it corrupt but before trying to fix it, try turning
recalculation on Manual and see if that helps. Tools, Options, Calculation,
Manual...Line chart: Dates in uneven intervalls on x-achsis #2
'Supplementary' questions: Is there a clever way to make excel recogniz
that '3 months' stands for '0.25 years', and '6 months' stands for '0.
I know, this is only cosmetics. Nevertheless it would be interesting
gdavids's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1589
View this thread: http://www.excelforum.com/showthread.php?threadid=27378
You could use a helper column that divides months by 12 to scale as years.
Jer...Draw a horizontal line after the last record is printed on each pa
The details section of my report draws vertical lines which grow to
accomodate text size changes. I would like to have a horizontal line drawn
when last record finishes printing on the page and joins the end of the last
vertical line to make a table.
Please help. Thanks.
There was at least one answer posted to your same question yesterday.
Microsoft Access MVP
> The details section of my report draws vertical lines which grow to
> accomodate text size changes. I would like to ha...moving selection
I want to be able to see which customers bought in the course of ten
consecutive days, where the BeginDate can be whatever date and which can vary
for each customer, how many products b, e, f one bought out of a range of
products a, b, c, d, e, f, g.
I’ve already tried many queries, amongst others with the Max and Min
function for the date of purchase, but that returns effectively the first and
last possible days. So, if someone buys 5 times on Jan 1st, Jan 3rd, Jan
9th, February 11th, March 3rd, I’ll get for the MinDate Jan 1st and for the
MaxDate March 3rd, regardless of the f...Printing a selection of an email
I suspect this is an old Outlook 2007 , Windows 7 question.
Suppose I wish to print a selected portion of an email message in
In either Outlook Express or Outlook 2003 al I do is open the message,
highlight the desired selection, then click File | Print | Selection.
But in Outlook 2007, when I select a message, and click File | Print,
the Print Selection is not present, or possibly hidden elsewhere. I
can either print the entire email, or selected entire pages.
So in the new improved Outlook 2007, what=92s the correct procedure to
print a desired selection?
P...Anyone want to draw roads?
Just thought that if anyone wants to do diagrams with roads or rivers as
double lines then Jeff Lanam (this n/group) kindly provided me with this
link to a free programme called OCAD. Its a tiny file, is EASY to use and
the results can be exported as a .bmp into Publisher.
I asked on this newsgroup how to achieve this and many threads resulted, so
thought I'd post the solution.
Many thanks Jeff (see reply to your post)
Glad you solved your map problem. An interesting program.
Mary Sauer MSFT MVP
http://msauer.mvps.o...Indicate intersection point on a two-line graph
I have a simple line graph with two lines (line A and line B). They
intersect at a given point (the break even point). How do I indicate
on the graph that this is the break even point. I know its very easy
to do with an arrow and text box. However, I would like the arrow and
text box to move to a new intersection as I change the numbers around.
Andy Pope has an example on his site which should help:
> I have a simple line graph with...Drawing graphs on Modal dialogs
I've encounter a strange phenomenon: I have an MFC application that
creates a child dialog using DoModal(). Within this child dialog I have
a couple of buttons and a graph plot drawn within the area of a Cstatic
using a third party API from GraphicsServer. This modal dialog has a
minimize button, but when I minimize the dialog, the graph doesn't
minimize with the dialog is always on top of the screen. Has anyone
encountered this problem? Do you think is is a GraphicsServer issue or
a Microsoft issue? I've called Graphics Server and they say that they
haven't countered my proble...AP Trail Balance should have option to select by due date
I believe the AP Aged Trial Balance could be enhanced to allow to select
transactions by a due date range. That way the report will provide a list of
invoices that a due within a specific due date range. I have a clinet that
has requested this functionality.
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click ...Where did the drawing go?
Visio 2003 SP2 with all the latest patches.
I have an extensive floor plan created in a file. I renamed the page by
double-clicking on the tab and replacing the name with 'Current'. I then
added a page and called it 'Proposed'. The program hour-glassed for a bit
which I thought was curious and then hung. I could close the program and
since I did some editing on the file, I saved it when prompted. The next
time I opened the file, the design was not visible and the scale was
literally off the charts (it says X = - 46 ft., Y = 89478492 ft. 6, and if I
go into Page Setup a...Need to get result of a select query in code
I have a select statement that I need to run in code. The select statement
needs to reference 2 variables which are in the code. I know that the usual
way to run a select in code is with DLookup. This if fine because I only
need 1 column of 1 record even though the select can return more than 1
record. But, the query needs to reference those 2 variables in the code.
How can I run a select in code which references 2 fields in the code and get
the result of 1 record (only)? If necessary I could put those 2 values in
textboxes on forms as I have several queries which reference textbox...Graph Line Width ?
Using Excel 2007.
Dumb question, but I just can't seem to get it to work.
Have a chart with a line graph.
Guess it's called a Scatter Graph.
Bunch of points, with lines connecting the points; the typical kind of
Looks fine, but I want to make the lines connecting all the data points
After clicking on the line graph (which I guess selects it) I
right-click with the mouse and go to Format Data Points, but this
doesn't seem to do anything for the entire line.
How can I easily change the line width for the entire graph ?
On Apr...How to draw text always visible
I Have program which is drawing objects(PIPES)using the OPENGL. The
labels for the for the PIPE is drawing using the GDI. The text colour for
the labels is same that of the objects. The labels are usually positioned at
out side of the pipe so that it will be visible always. But while rotating
there are possibilities that the labels and objects coincide. I want to set
the labels always visible with respect to the back ground colour.
I used SetRop2() but it has no effect.
Any help would be greatly appreciated
...Lines on chart don't correlate to values being charted
I'm having a strange problem with a chart done in Excel 2003 (on a workbook
prepared by someone other than myself, so I'm not sure of all that has
happened with it before.) There are three lines drawn on the chart, and one
is normal - that is, the line drawn correlates to the values being charted.
But the other two lines don't correlate to the numbers they should be
charting. When you hover over these two lines and it tells you the values
for the data point, the data point values are fine - but that isn't what the
line is drawing! For example, one series is charting ...