WHY select the first item didn't receive OnPaint in LISTCTRL!

hello everyone,

I write a custom listctrl inherit from the CListCtrl( MFC ).
I don't use CUSTOMDRAW and OWNDRAW, and rewrite the OnPaint fucntion.

The OnPaint function like this:

void CListCtrlST::OnPaint()
{
	CPaintDC dc(this); // device context for painting

	/////////////////////////////////////////////////
	CRect rtList;
	GetClientRect( &rtList );

	CDC* pDC = &dc;
	CMemDC memDC( pDC, &rtList );    // double buffer.....
	memDC.SetBkMode( TRANSPARENT );

             // don't use the system paint, because it's too slow...
             // if you resize the listctrl size quickly, the draw is
too slow..
             // I don't know reason. so I use my paint replace it.
	//DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, (LPARAM)0);

	INT nRemainHeight = rtList.Height( );
	INT nItem = -1;
	// get the firtst visiable item , and draw next item until the end
visiable item
	for ( nItem = GetTopIndex( );nItem < GetItemCount( );nItem++ )
	{
                          // draw item.
		CRect rtItem = DrawLine( nItem, &memDC );
		nRemainHeight -= rtItem.Height( );
		if ( nRemainHeight < 0 )
		{
			break;
		}
	}

}

BOOL CListCtrlST::OnEraseBkgnd(CDC* pDC)
{
	return TRUE;
	//return CListCtrl::OnEraseBkgnd(pDC);
}


I didn't use the system paint, because if you resize the listctrl size
quickly, the draw is too slow..

but question came!!!!!  :(

I click the item, the OnPaint was called, Although I redraw all items
of page,
it's quickly enough.

but If I click the first item of the listctrl, OnPaint dose not work,
the function was not
called. why?

all items worked well except the first.

who tell me why?????????
thank you very muck!

MSN: madmanahong@hotmail.com

------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
appendix:
I am sorry to delete all comment, because the comment is write by
simplified chinese.
the google didn't allow me post, and say :
" We were unable to post your message, Binary posts not allowed in
non-binary groups.  "

:)


CRect CListCtrlST::DrawLine( INT nItem, CDC* pDC )
{
	TCHAR szBuff[512];


	LVITEM lvi;
	lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
	lvi.iItem = nItem;
	lvi.iSubItem = 0;
	lvi.pszText = szBuff;
	lvi.cchTextMax = sizeof(szBuff) - 1;
	lvi.stateMask = 0xFFFF;     // get all state flags
	GetItem( &lvi );


	CRect rtItem;
	GetItemRect( nItem, &rtItem, LVIR_BOUNDS );

	CRect rtSelect;
	if ( GetExtendedStyle( ) & LVS_EX_FULLROWSELECT )
	{
		CRect rtList;
		GetClientRect( rtList );
		rtSelect.top = rtItem.top;
		rtSelect.bottom = rtItem.bottom;
		rtSelect.left = 0;
		rtSelect.right = rtList.Width( );
	}
	else
	{
		GetItemRect( nItem, rtSelect, LVIR_LABEL );
	}


	BOOL bSelected = ( lvi.state & LVIS_SELECTED );
	COLORREF crTextColor = bSelected ? m_crHighText : m_crFontColor;
	COLORREF crBackColor = bSelected ? m_crHighBack :
		( ( nItem % 2 ) ? m_rtBackColor1 : m_rtBackColor2 );


	CBrush backBrush( crBackColor );
	pDC->FillRect( &rtSelect, &backBrush );
	pDC->SetTextColor( crTextColor );


	UINT uiFlags = ILD_TRANSPARENT;
	UINT nStateImageMask = lvi.stateMask & LVIS_STATEIMAGEMASK;
	CSize sizeIcon( 0, 0 );
	if ( lvi.iImage >= 0 )
	{
		INT nImage = lvi.iImage;
		CImageList* pImageList = GetImageList( LVSIL_SMALL );
		if ( pImageList )
		{
			if ( !::ImageList_GetIconSize( pImageList->GetSafeHandle( ),
				( INT* )&sizeIcon.cx, ( INT* )&sizeIcon.cy ) )
			{
				sizeIcon.SetSize( 16, 16 );
			}

			ImageList_DrawEx( pImageList->m_hImageList, lvi.iImage,
				pDC->m_hDC, rtItem.left, rtItem.top, sizeIcon.cx, sizeIcon.cy,
				CLR_NONE, CLR_NONE, ILD_TRANSPARENT );
		}
	}


	CRect rtLabel;
	GetItemRect( nItem, rtLabel, LVIR_LABEL );
	rtLabel.left += ( sizeIcon.cx + OFFSET_FIRST);
	//rtLabel.MoveToX( rtLabel.left + OFFSET_FIRST );
	pDC->DrawText( szBuff, -1, rtLabel,
		DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER |
DT_END_ELLIPSIS );


	LV_COLUMN lvc;
	lvc.mask = LVCF_FMT | LVCF_WIDTH;
	for ( INT nColumn=1;GetColumn( nColumn, &lvc );nColumn++ )
	{
		rtLabel.left = rtLabel.right;
		rtLabel.right += lvc.cx;


		INT nItemLength = GetItemText( nItem, nColumn,
			szBuff, sizeof( szBuff ) );
		if ( nItemLength <= 0 )
		{
			continue;
		}


		UINT nJustify = DT_LEFT;
		switch( lvc.fmt & LVCFMT_JUSTIFYMASK ){
		case LVCFMT_RIGHT:
			nJustify = DT_RIGHT;
			break;
		case LVCFMT_CENTER:
			nJustify = DT_CENTER;
			break;
		}

				CRect rtTmp = rtLabel;
		rtLabel.right -= OFFSET_OTHER;
		rtLabel.MoveToX( rtLabel.left + OFFSET_OTHER );
		pDC->DrawText( szBuff, nItemLength, rtLabel, nJustify |
			DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER |
DT_END_ELLIPSIS );
	}
	
	
	return rtItem;
}

0
madmanahong
9/18/2006 3:52:01 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
582 Views

Similar Articles

[PageSpeed] 57

Specifically, I don't know, but generally you can not trust any of the 
standard or common controls to ever reliably update themselves through 
WM_PAINT exclusively.

-- 
Jeff Partch [VC++ MVP]


"madmanahong" <madmanahong@163.com> wrote in message 
news:1158551521.012903.266410@e3g2000cwe.googlegroups.com...
> hello everyone,
>
> I write a custom listctrl inherit from the CListCtrl( MFC ).
> I don't use CUSTOMDRAW and OWNDRAW, and rewrite the OnPaint fucntion.
>
> The OnPaint function like this:
>
> void CListCtrlST::OnPaint()
> {
> CPaintDC dc(this); // device context for painting
>
> /////////////////////////////////////////////////
> CRect rtList;
> GetClientRect( &rtList );
>
> CDC* pDC = &dc;
> CMemDC memDC( pDC, &rtList );    // double buffer.....
> memDC.SetBkMode( TRANSPARENT );
>
>             // don't use the system paint, because it's too slow...
>             // if you resize the listctrl size quickly, the draw is
> too slow..
>             // I don't know reason. so I use my paint replace it.
> //DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, (LPARAM)0);
>
> INT nRemainHeight = rtList.Height( );
> INT nItem = -1;
> // get the firtst visiable item , and draw next item until the end
> visiable item
> for ( nItem = GetTopIndex( );nItem < GetItemCount( );nItem++ )
> {
>                          // draw item.
> CRect rtItem = DrawLine( nItem, &memDC );
> nRemainHeight -= rtItem.Height( );
> if ( nRemainHeight < 0 )
> {
> break;
> }
> }
>
> }
>
> BOOL CListCtrlST::OnEraseBkgnd(CDC* pDC)
> {
> return TRUE;
> //return CListCtrl::OnEraseBkgnd(pDC);
> }
>
>
> I didn't use the system paint, because if you resize the listctrl size
> quickly, the draw is too slow..
>
> but question came!!!!!  :(
>
> I click the item, the OnPaint was called, Although I redraw all items
> of page,
> it's quickly enough.
>
> but If I click the first item of the listctrl, OnPaint dose not work,
> the function was not
> called. why?
>
> all items worked well except the first.
>
> who tell me why?????????
> thank you very muck!
>
> MSN: madmanahong@hotmail.com
>
> ------------------------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------------------------
> appendix:
> I am sorry to delete all comment, because the comment is write by
> simplified chinese.
> the google didn't allow me post, and say :
> " We were unable to post your message, Binary posts not allowed in
> non-binary groups.  "
>
> :)
>
>
> CRect CListCtrlST::DrawLine( INT nItem, CDC* pDC )
> {
> TCHAR szBuff[512];
>
>
> LVITEM lvi;
> lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
> lvi.iItem = nItem;
> lvi.iSubItem = 0;
> lvi.pszText = szBuff;
> lvi.cchTextMax = sizeof(szBuff) - 1;
> lvi.stateMask = 0xFFFF;     // get all state flags
> GetItem( &lvi );
>
>
> CRect rtItem;
> GetItemRect( nItem, &rtItem, LVIR_BOUNDS );
>
> CRect rtSelect;
> if ( GetExtendedStyle( ) & LVS_EX_FULLROWSELECT )
> {
> CRect rtList;
> GetClientRect( rtList );
> rtSelect.top = rtItem.top;
> rtSelect.bottom = rtItem.bottom;
> rtSelect.left = 0;
> rtSelect.right = rtList.Width( );
> }
> else
> {
> GetItemRect( nItem, rtSelect, LVIR_LABEL );
> }
>
>
> BOOL bSelected = ( lvi.state & LVIS_SELECTED );
> COLORREF crTextColor = bSelected ? m_crHighText : m_crFontColor;
> COLORREF crBackColor = bSelected ? m_crHighBack :
> ( ( nItem % 2 ) ? m_rtBackColor1 : m_rtBackColor2 );
>
>
> CBrush backBrush( crBackColor );
> pDC->FillRect( &rtSelect, &backBrush );
> pDC->SetTextColor( crTextColor );
>
>
> UINT uiFlags = ILD_TRANSPARENT;
> UINT nStateImageMask = lvi.stateMask & LVIS_STATEIMAGEMASK;
> CSize sizeIcon( 0, 0 );
> if ( lvi.iImage >= 0 )
> {
> INT nImage = lvi.iImage;
> CImageList* pImageList = GetImageList( LVSIL_SMALL );
> if ( pImageList )
> {
> if ( !::ImageList_GetIconSize( pImageList->GetSafeHandle( ),
> ( INT* )&sizeIcon.cx, ( INT* )&sizeIcon.cy ) )
> {
> sizeIcon.SetSize( 16, 16 );
> }
>
> ImageList_DrawEx( pImageList->m_hImageList, lvi.iImage,
> pDC->m_hDC, rtItem.left, rtItem.top, sizeIcon.cx, sizeIcon.cy,
> CLR_NONE, CLR_NONE, ILD_TRANSPARENT );
> }
> }
>
>
> CRect rtLabel;
> GetItemRect( nItem, rtLabel, LVIR_LABEL );
> rtLabel.left += ( sizeIcon.cx + OFFSET_FIRST);
> //rtLabel.MoveToX( rtLabel.left + OFFSET_FIRST );
> pDC->DrawText( szBuff, -1, rtLabel,
> DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER |
> DT_END_ELLIPSIS );
>
>
> LV_COLUMN lvc;
> lvc.mask = LVCF_FMT | LVCF_WIDTH;
> for ( INT nColumn=1;GetColumn( nColumn, &lvc );nColumn++ )
> {
> rtLabel.left = rtLabel.right;
> rtLabel.right += lvc.cx;
>
>
> INT nItemLength = GetItemText( nItem, nColumn,
> szBuff, sizeof( szBuff ) );
> if ( nItemLength <= 0 )
> {
> continue;
> }
>
>
> UINT nJustify = DT_LEFT;
> switch( lvc.fmt & LVCFMT_JUSTIFYMASK ){
> case LVCFMT_RIGHT:
> nJustify = DT_RIGHT;
> break;
> case LVCFMT_CENTER:
> nJustify = DT_CENTER;
> break;
> }
>
> CRect rtTmp = rtLabel;
> rtLabel.right -= OFFSET_OTHER;
> rtLabel.MoveToX( rtLabel.left + OFFSET_OTHER );
> pDC->DrawText( szBuff, nItemLength, rtLabel, nJustify |
> DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER |
> DT_END_ELLIPSIS );
> }
>
>
> return rtItem;
> }
> 


0
jeffp (1711)
9/18/2006 1:09:15 PM
Reply:

Similar Artilces:

burning CD's
Trying to burn cd's of music - I successfully burnt two, now I have it all set up to burn, and I click START BURN and all I get is INSPECTING at the first song??? ...

Combo box list selection based on earlier selection by user
HI, I have a form that has a combo box 1 (Product) that reads a the Product table and has a unique id attached to each product (RO#). There is a second combo box 2 that is RO#. Now what I would like to do is when a user selects a Product in combo box 1, the system should lookup the Product selected from combo box 1 and upload the corresponding RO# in the combo box 2 list. Now I am using both combo boxes as Unbound and in the combo box 2 I have the two columns Product and RO# - in the Criteria row of RO# I have the following: Like IIf([Forms]![xa_f_lookup]![RO#]=" ",[Forms]![x...

Run report on multi selected records.
I try to make a report for a custom entity that works like the Account Summary: let's say that it's Customer's Inquiry Summary for entity Customer's Inquiry I made the report so that I'm able to run the report on Customer's Inquiry Form. But when I select multi records in the list of Customer's Inquiry and run report, only one record is show in one page of the the report. I would like to have the selected records appear in the report with each record on each page. How can I do this? ...

I am missing email, not visible but being received
I recently upgraded from Outlook Express to Outlook2003 and I successfully imported and transfered all my folder in Outlook2003. I removed all my info from Express. When I click Send/Receive the progress bar shows emails coming in but I cannot view them. They are not in any folder and I cant get them from the PST files. I am running WIndowsXP on a laptop, no server or anything fancy. Just a plain old Dell Inspiron 6000. In news:3B809559-E9D7-40F3-9027-15AE2983212D@microsoft.com, Brian <Brian@discussions.microsoft.com> typed: > I recently upgraded from Outlook Express to ...

automatically replicating my first page.
Ok, I'm creating a basic table for recording data. I have the page set up exactly how I want it...now, what I need it to do is when I fill all the cells on the first page and activate a second page it gives me an exact copy of my original page, with obviously just page number changed in the footer. I don't want to have to mess around with recreating the form every time I fill a page in. Hi Rusty, Your comment "what I need it to do is when I fill all the cells on the first page and activate a second page it gives me an exact copy of my original page". Do you mean pa...

Calendar items missing if Outlook 2003 is run in Cached Exchange Mode
We have more than a few users that have noticed items don't show up in the calendar but show up in OWA and on their PDA's. If we disable Cached Exchange Mode then the items appear?! We are running Exchange Server 2003 fully patched, Outlook 2003 fully patched in Windows XP Pro. There are no synch errors reported. This is very disturbing and I cannot determine what is causing the problem. Mailbox size is limited to 400MB. Any help would be greatly appreciated. TIA ...

Command Buttons Not Responding on First Click
Using Access 2003. Very simple, I have a command button to close the form. Code is as follows (form is called "Select212Form") Private Sub btnMenu_Click() On Error GoTo Err_btnMenu_Click DoCmd.Close acForm, "Select212Form" Exit_btnMenu_Click: Exit Sub Err_btnMenu_Click: MsgBox Err.Description Resume Exit_btnMenu_Click End Sub The button does nothing the first time it's clicked. Next time, I click it, it works! It's not a double-click, there is a pause between clicks. If I put a breakpoint in there, it enters the routine on the first click ...

Send/Receive while outlook closed?
I have this code to send email using Excel macro, it works fine abut the message stays in outbox until i open outlook then it sends it. how i can send receive even if outlook closed? any help? thanks! Sub ComposeMail(strto As String, strSubject As String, strbody As String, strAttachment As String) Dim objOL As Outlook.Application Dim objX As Outlook.MailItem Set objOL = New Outlook.Application Set objX = objOL.CreateItem(olMailItem) With objX .To = strto .Subject = strSubject .Body = strbody If strAttachment <> ...

Can't select objects in Excel 2007
I'm trying to create a form in Excel 2007, and although I can manipulate, copy & paste controls (check boxes, etc) I can't select multiple objects to align them, etc. I've checked on-line help (and have followed the instructions), and other websites, but no one seems to have indicated a problem. It is extremely cumbersome and I need a solution. Any ideas? Thanks in advance, Jim Berglund I know this is about a year too late, but it may help others who have stumbled across this page looking for similar help. On the Home tab, in the Editing group, click Find & Select....

Compare 2 rows of data and update the first
I have 2 lists both have the same data in each (account names). Th first list is the master and the second list is a new accounts list. I would like to compare the second list to the first one and if th account is not in the first list then I would like it added to list 1. The second list changes frequently so I am looking to automate thi process. I am able to do vlookups to check for matches but I am unsure of how t perform the additional tasks of updating. Is there a simple solution with formulas or do I need to insert macro/program? thank you for your time and help, Bob -- Message ...

Lot Selection not Showing when I select PO on Receiving Entry
Usually, the Lot selection screen would pop up when I select a PO at the Line Detail of the Receivings Entry, now it does not! And GP will let items post without a lot number! It seems as if a setting has changed. Any ideas anyone? Any help is appreciated. Thanks, R Are you sure the item is marked to track lots? This wiould be set item by item on the Item Maintenance Options window. -- Richard L. Whaley Author / Consultant / MVP 2006-2008 Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at http://www.AccoladePublications.com &q...

Outlook not receiving a particular message
I am having a problem with my Exchange server receiving e-mails from the NCAA and not being able to see them in Outlook. I have tried 2 different e-mail addresses on my Exchange server and the users get the messages delivered to their BlackBerry devices, but they never show up in Outlook. I have tried everything I can think of in Outlook and still can't get the messages to appear. Any help will be greatly appreciated. This is a long shot but have you tried turning off the Junk E-mail filter? <cliff.mcmanus@gmail.com> wrote in message news:1138138436.405759.252750@g43g2000cwa.goog...

Select contact then hangs
Hi, please help. I have a user that when she selects a contact using To: in a new email, after selecting 2, it closes outlook??. Spec is W2kSP4\office2k with all windows updates and office updates installed. Profile has been deleted and re-created, plus i have set up personal folders and moved contacts into there, and set that folder as a default, but makes no difference. Please help. ...

Selecting rows from various sheets
Hi all, I have several sheets with a few columns in each. One colum in each sheet has a unique value. Most of these unique values are th same in each sheet but not all. Is there any way that I can set up new sheet that will have the unique value in column 1 and th corresponding column values frommeach sheet beside it. For example Sheet 1 aa 1 1 1 bb 2 2 2 cc 3 3 3 Sheet 2 aa 4 4 cc 5 5 Result aa 1 1 1 4 4 bb 2 2 2 cc 3 3 3 5 5 Thanks alot, Sha -- sha ----------------------------------------------------------------------- shav's Profile: http...

sent items missing from inbox
When I reply to an item in my inbox, it disappears from the inbox. I can retrieve it from my sent items, but it no longer exists in the inbox. This is a new development. Any thoughts? Check your view settings - sounds like you're set to view only unread mail. Debra Vinikour wrote: > When I reply to an item in my inbox, it disappears from > the inbox. I can retrieve it from my sent items, but it > no longer exists in the inbox. This is a new > development. Any thoughts? Check your views on the inbox to ensure it is not set to Unread Items. (HINT - Best to enable t...

HELP! can send email, but cannot receive
i am very new at this admin business. i have never done it before and i'm all alone at a small struggling cd distribution company. we are still running windows server 2000 with exchange (not sure exactly what version). i was informed this morning that the e-mail wasn't working. after running some tests i have come to the conclusion that internal sending and receiving of mail works fine. also, we can send e-mail out of the office, i tested it with my gmail account. however, we cannot receive e-mail. the amount of spam has decreased! as well as all our clients communication. i'm sor...

select text in Calendar
I'm working on a calendar in Publisher. I'm adding text into a cell by spacing down 1 point, then typing in 8 points. Doing fine until April. At that time, I can only select cells (whole days). It will not let me select the text. Help is no help. Any hints out there. Did I accidentally select something to do this? Bonnie Have you added a picture to the cell or a shape? If you have send it to the back, make the cell no fill and try again. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "GoBonnieGo" <GoB...

macro to filter data based on selected data
Hi, I am looking for a macro that requests input of a reference code and then a date and then filters the data in my spreadsheet based on this criteria. I am using excel 2007. Any help with this will be greatly appreciated. You can probably record a macro while doing it manually and then clean it up and add input boxes to ask the question or input your variable in a cell and use that. If all else fails, If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the ...

Apply Rule -- Workflow Process list has missing items
Hi, I was working at applying rules manually. I used to have 3 rules to choose from. Then I had 2, then 1, and now 2 again. The 3 rules exist and have been activated the entire time. The only thing I may have done is refresh (F5) the form while the rule was running. Now it is does not have the entire list of 3 rules to choose from on this item (Order). On all other orders, the list contains 3, but only 2 for this one. Anyone have ANY insight on this behaviour?? I have seen this behaviour once before. I ended up recreating the item (it was a Case, but this time it is an Order). ...

Link select with a blast
I have Win 7 Home Premium, x64. Quite often, when I select a link, a mouse pointer changes to a palm with a blast. I understand, the palm is the standard mouse pointer for link select, but what is the blast? What it indicates? -- Ilya Zeldes Fort Myers, Florida Hi Ilya, I suspect that this is being caused by a tracking program. Run something like Ad-Aware and see if it indicates a tracking company. If so, you can delete it, however, it might prevent you from accessing that particular website. Dave "Ilya Zeldes" wrote in message news:7A6FF9B1-5512-44...

On POS: Disallow Tendering with no items rung in the transaction
You can tender a transaction even when no items have ever been recorded. The drawer doesnt open but the receipt prints, as if it were legitimate transaction and it leaves room for potential cashier fraud. This should not be allowed under any circumstances. Perhaps if the balance is Zero and items were previously recorded(voided or refunded) there can be an option to allow or not allow finalization. Or with Manager Override. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the &...

Several questions from first time user
I am a first time user of Money (or for that matter any finance software). Have the following questions. I am using Money 2007 Premium on Windows XP Pro SP2. 1. How do I change the background color from the default white. My eyes start irritating within half an hour of working on a software application that has white background. Money 2007 is not honoring the color schemes already set in Windows XP and IE7 on most pages. (On the online pages where it pulls information from a website directly, it is using IE itself, so obviously honors the color scheme there!) I found the followi...

Select Case in a Change Event
Hi, I am trying to use a worksheet Change Event to trap changes to specific columns. depending on which column is chnaged by the user, the value in another ciolumn will be altered; so, changes in either column O or P will update column Q, changes in either column T or U will update column V and changes in column Z or AA will update column AB. What I can't figure out is the Select Case bit (where I've got the shouted question below). Here's what I've put together, any comments would be much appreciated. Private Sub Worksheet_Change(ByVal Target As Range) ...

Messages not reflecting in 'Sent Items'
Why is it that when you submit a query or form or whatever to a site which provides for that kind of correspondence, a copy of your e-mail message to them doesn't appear in your own 'Sent Items'. If it doesn't reflect there, how do you know if you've sent it? -- Anne100 Because you're not using Outlook to send the message. I make the assumption that you're visiting a web site with something like a "Contact Us" form that generates an email message to the site owner. Such a form lives on the web site and is filled out on the web site. The email me...

Select Records based another table...
This may be very elementary, but i can't wrap my brain around it. I have tried to dummy it down as much as i can for myself, with plans of adapting it into something working. I have three tables that look like the following: Tbl 1: ProdID A B C 1 $1 $2 $3 2 $4 $5 $6 3 $7 $8 $9 Tbl 2: RmNum ProdID 1 3 1 2 2 1 2 2 Tbl 3: RmNum Style 1 A 2 C Relationships are: [tbl1 ProdID] ------ [tbl2 ProdID] [tbl2 RmNum] ...