How to update 'Edit Control' text from Timer Callback.

Hi,
I need a way to update an Edit control control in MFC from a timer
callback function. How can that be done as we cannot reference dialog
box controls from
callbacks?

Even the following code gives me problems:

VOID CALLBACK TimerProc ( HWND hParent, UINT uMsg, UINT uEventID,
DWORD dwTimer )
{
   //Add the text
   CEdit *ptrtxtActivity;
   ptrtxtActivity = reinterpret_cast<CEdit
*>(GetDlgItem(hParent,txtboxActivity));
   ptrtxtActivity->SetWindowText(text);
}

Please let me know,

Thank you,
IdleBrain

0
10/22/2007 3:23:31 PM
vc.mfc 33608 articles. 0 followers. Follow

19 Replies
429 Views

Similar Articles

[PageSpeed] 3

"IdleBrain" <indianmostwanted@yahoo.com> ha scritto nel messaggio 
news:1193066611.078141.192170@e9g2000prf.googlegroups.com...

> I need a way to update an Edit control control in MFC from a timer
> callback function.

Why don't you use CWnd::OnTimer, and process the timer event there, so you 
can easily access CEdit data members?

Giovanni


0
10/22/2007 3:28:45 PM
"Giovanni Dicanio" <giovanni.dicanio@invalid.it> ha scritto nel messaggio 
news:eaTBPBMFIHA.4308@TK2MSFTNGP06.phx.gbl...
>
> "IdleBrain" <indianmostwanted@yahoo.com> ha scritto nel messaggio 
> news:1193066611.078141.192170@e9g2000prf.googlegroups.com...
>
>> I need a way to update an Edit control control in MFC from a timer
>> callback function.
>
> Why don't you use CWnd::OnTimer, and process the timer event there, so you 
> can easily access CEdit data members?

You may find that to be interesting:

http://msdn2.microsoft.com/en-us/library/49313fdf(VS.80).aspx

G


0
10/22/2007 3:33:09 PM
> Why don't you use CWnd::OnTimer, and process the timer event there, so you
> can easily access CEdit data members?
> Giovanni

Thanks for your reply Giovanni..

I am a newbee to MFC and I started with OnTimer method first.
But for some reason, the OnTimer function was never called after I use
SetTimer().

I used the following article for reference: http://www.functionx.com/visualc/controls/timer.htm

Do you know why that could have happened?


0
10/22/2007 3:40:17 PM
IdleBrain wrote:
>> Why don't you use CWnd::OnTimer, and process the timer event there, so you
>> can easily access CEdit data members?
>> Giovanni
> 
> Thanks for your reply Giovanni..
> 
> I am a newbee to MFC and I started with OnTimer method first.
> But for some reason, the OnTimer function was never called after I use
> SetTimer().
> 
> I used the following article for reference: http://www.functionx.com/visualc/controls/timer.htm
> 
> Do you know why that could have happened?

Idle:

Where/how do you call SetTimer()? You're calling CWnd::SetTimer(), right?

-- 
David Wilkinson
Visual C++ MVP
0
no-reply8010 (1791)
10/22/2007 4:13:18 PM
"IdleBrain" <indianmostwanted@yahoo.com> ha scritto nel messaggio 
news:1193067617.380786.34820@y27g2000pre.googlegroups.com...
>> Why don't you use CWnd::OnTimer, and process the timer event there, so 
>> you
>> can easily access CEdit data members?
>> Giovanni
>
> Thanks for your reply Giovanni..

You're welcome.

> I am a newbee to MFC and I started with OnTimer method first.
> But for some reason, the OnTimer function was never called after I use
> SetTimer().
[...]
> Do you know why that could have happened?

I'm sorry, but I don't know, without reading your source code...

If you want, you can download a simple MFC timer example I have developed 
for you; this is the URL:

http://www.geocities.com/giovanni.dicanio/temp/MfcTimerTest.zip

This sample uses a timer ticking each second, and at each timer tick it 
increases an integer counter, whose value is shown into an edit-box.

You can read the source code of CMfcTimerTestDlg class (the main dialog), in 
the files MfcTimerTestDlg.h/.cpp (there are comments, so you can follow it 
easily).

HTH,
Giovanni


0
10/22/2007 4:52:16 PM
Giovanni, thanks a lot for ur sample app. Your sample app works
perfect.

But, for some reason the OnTimer method in my project is still never
called.
Here is the code that I have been using:

void CxDlg::OnBnClickedOk()
{
	CString strCurCaption;
	GetDlgItem(IDOK)->GetWindowText(strCurCaption);

	if(strCurCaption == "Start")
	{
		char c[] = "Stop";
		CString strNewCaption(c);
		GetDlgItem(IDOK)->SetWindowText(strNewCaption);
		utmrTx = SetTimer (1, 1000, NULL);
	}
	else
	{
		char c[] = "Start";
		CString strNewCaption(c);
		GetDlgItem(IDOK)->SetWindowText(strNewCaption);
		// Stop the timer
		KillTimer(utmrTx);
	}
}

void CxDlg::OnTimer(UINT nIDEvent)
{

                //Do some stuff

               //Restart the timer
	CDialog::OnTimer(nIDEvent);
}

Let me know if you need more information.
I really appreciate your help :)

Idlebrain

0
10/22/2007 6:02:37 PM
> Where/how do you call SetTimer()? You're calling CWnd::SetTimer(), right?
> David Wilkinson
> Visual C++ MVP

David,
when I put the cursor on the code, I see that a popup help message
that displays CWnd::SetTimer().
But could not for the some reason figure out why OnTimer isnt called.

I have posted my sample code also.

Thanks for your effort.

0
10/22/2007 6:07:30 PM
IdleBrain wrote:
> Giovanni, thanks a lot for ur sample app. Your sample app works
> perfect.
> 
> But, for some reason the OnTimer method in my project is still never
> called.
> Here is the code that I have been using:
> 
> void CxDlg::OnBnClickedOk()
> {
> 	CString strCurCaption;
> 	GetDlgItem(IDOK)->GetWindowText(strCurCaption);
> 
> 	if(strCurCaption == "Start")
> 	{
> 		char c[] = "Stop";
> 		CString strNewCaption(c);
> 		GetDlgItem(IDOK)->SetWindowText(strNewCaption);
> 		utmrTx = SetTimer (1, 1000, NULL);
> 	}
> 	else
> 	{
> 		char c[] = "Start";
> 		CString strNewCaption(c);
> 		GetDlgItem(IDOK)->SetWindowText(strNewCaption);
> 		// Stop the timer
> 		KillTimer(utmrTx);
> 	}
> }

A few things here to make your life easier. In CxDlg add a bool member. 
It is considered bad form to use GetDlgItem in dialog members.

bool bTimerRunning;

and a control member

CButton cStartStopButton;

Add this with the wizard so the control gets subclassed.
In the resource view, right click the button and add variable.

Then:
void CxDlg::OnClickStartStop( )
{
    if( bTimmerRunning )
    {
       KillTimer( utmrTx );
       cStartStopButton.SetWindowText( _T("Start") );
    }
    else
    {
       utmrTx= SetTimer( 1, 1000, NULL );
       cStartStopButton.SetWindowText( _T("Stop") );
    }
    bTimmerRunning= !bTimmerRunning;
}

CxDlg::CxDlg(...)
    :bTimerRunning( false )
....

**
You may take this a step further and put the SetWindowText in a 
'SetControls' member so it can be call from your on click and InitDialog.
**

> 
> void CxDlg::OnTimer(UINT nIDEvent)
> {
> 
>                 //Do some stuff
> 
>                //Restart the timer
> 	CDialog::OnTimer(nIDEvent);
> }

My guess is you don't have the message mapped:

BEGIN_MESSAGE_MAP( CxDlg, ... )
    ON_WM_TIMER( )
....

Best, Dan.
0
public21 (290)
10/22/2007 6:59:27 PM
Dan,
Thanks for your reply. Your guess is absolutely right.
I do not have ON_WM_TIMER() in BEGIN_MESSAGE_MAP() which resulted in
the timer not being called.

I am a .NET guy and all this is pretty new and shocking to me :)
Thanks for all your coding techniques. I really appreciate your help.

Idle Brain.

0
10/22/2007 7:15:19 PM
"IdleBrain" <indianmostwanted@yahoo.com> wrote in message 
news:1193080519.090823.160550@z24g2000prh.googlegroups.com...
> Dan,
> Thanks for your reply. Your guess is absolutely right.
> I do not have ON_WM_TIMER() in BEGIN_MESSAGE_MAP() which resulted in
> the timer not being called.
>
> I am a .NET guy and all this is pretty new and shocking to me :)
> Thanks for all your coding techniques. I really appreciate your help.
>

Actually, adding a ON_WM_TIMER in the message map is no more "shocking" than 
using += to add a delegate in .NET!  :-)

-- David


0
dc2983 (3206)
10/22/2007 9:38:41 PM
"IdleBrain" <indianmostwanted@yahoo.com> ha scritto nel messaggio 
news:1193080519.090823.160550@z24g2000prh.googlegroups.com...

> I am a .NET guy and all this is pretty new and shocking to me :)

If you are serious about MFC, you should consider reading a good book about 
that; I believe you will find "Programming Windows with MFC" by Jeff Prosise 
(MS Press) to be a good investment both in money and in time spent reading 
it.

Giovanni


0
10/23/2007 8:16:51 AM
Thanks for your input guys..I am serious about MFC and so I started
working on it.But it takes time, doesn't it?
Does Microsoft have any certification exams for C++?

I always keep asking myself if C# would ever replace C++ and MFC and
make life easy for programmers.
But, I dont think it does..


0
10/23/2007 2:01:02 PM
"IdleBrain" <indianmostwanted@yahoo.com> ha scritto nel messaggio 
news:1193148062.958479.125000@z24g2000prh.googlegroups.com...

> I am serious about MFC and so I started
> working on it.But it takes time, doesn't it?

Yes, it takes time.

> I always keep asking myself if C# would ever replace C++ and MFC and
> make life easy for programmers.
> But, I dont think it does..

This topic has been discussed here several times.

I think C# is just a tool different from native C++ and MFC.
There is place for both.

C# (or VB [*] ) and .NET are very powerful for Internet and web 
applications, and also to develop tools quickly.

If you want high performance, you should go native with C++. And MFC is a 
good framework for C++ and Windows programming, especially thanks to 
community contributions to jewel sites like CodeProject ( 
http://www.codeproject.com - you will found tons of great MFC stuff on it!).

Moreover, as David pointed, there's no big difference between using += for a 
delegate, or adding an MFC message map entry :)
IMHO, what is important is clear *documentation* on how to do things, and 
*tools* support.

With Visual C++ 6 Microsoft built a great IDE for C++ and MFC development.
Then the quality of the IDE for C++ decreased (e.g. they removed a great 
tool called ClassWizard, who helped a lot with C++ and MFC).

But now Microsoft is focused again on native C++ and MFC, so we can expect 
great things in the future.

Giovanni

[*] IMHO, what really matters more than the languages is the *.NET 
framework*. In fact, both C# and VB source codes are compiled targetting the 
..NET framework, so it is more about syntax difference between C# and VB. C# 
and VB share the same .NET framework, with the same class libraries, and 
with the same power.



0
10/23/2007 2:16:10 PM
"IdleBrain" <indianmostwanted@yahoo.com> ha scritto nel messaggio 
news:1193148062.958479.125000@z24g2000prh.googlegroups.com...

> I always keep asking myself if C# would ever replace C++ and MFC and
> make life easy for programmers.
> But, I dont think it does..

BTW: About making programming easier, I believe that sure programming can be 
made easier thanks to proper libraries, third-parties frameworks, 
well-designed tools, etc.
But I also believe that programming has a level of complexity that cannot be 
removed.

Programming (especially: *good* programming) does require training, practice 
and education (and passion, IMHO).

As you can't just take a man from a street and make him a piano player, so 
in the same way, you can't make a person (who has no programming practice 
and training) a good programmer with no effort.

Maybe the first versions of Visual Basic (not VB.NET, which is a different 
beast from "classic" Visual Basic, IMHO) tended to give that kind of 
illusion, but I belive it was just an *illusion*.

If you have just a database with some independent tables (with no inner 
joins), then you can drag-and-drop data-bound controls to a form, select a 
data-source property with mouse, and "magically" you can see the forms 
populated with data read from the database, without writing a single line of 
code.
But then you must do checks, verify user input, update, check for errors, 
etc.
And when you have more complex data to manage, then more advanced 
programming comes to play.

And of course, there are some hard (and cool) programming tasks, like 
developing an operating system, which cannot be done with "drag-and-drop" ;)

Just my 0.02
Giovanni



0
10/23/2007 2:47:59 PM
I had to work with MFC for around 6 months before I felt really productive. 
Of course I was doing useful work during that time.  FWIW, I've had a 
similar experience learning C# and ASP.NET over the last few months so 
perhaps that is true with any new significant paradigm shift.

Tom

"IdleBrain" <indianmostwanted@yahoo.com> wrote in message 
news:1193148062.958479.125000@z24g2000prh.googlegroups.com...
> Thanks for your input guys..I am serious about MFC and so I started
> working on it.But it takes time, doesn't it?
> Does Microsoft have any certification exams for C++?
>
> I always keep asking myself if C# would ever replace C++ and MFC and
> make life easy for programmers.
> But, I dont think it does..
>
> 


0
tserface (3861)
10/24/2007 1:09:43 AM
I think it is getting tougher sometimes when the paradigms meet in the 
middle.  For example, if I were building a device driver or service I would 
likely use MFC, although you could use .NET even for that.  If I were doing 
a desktop application I would agonize over which is better.  MFC makes a 
better application in my opinion, but .NET is easier and has better built in 
tools in the IDE.  I think MFC is very useful (obviously I'm a huge MFC 
advocate), but the boundaries are getting more blurry all the time.

Tom

"Giovanni Dicanio" <giovanni.dicanio@invalid.it> wrote in message 
news:%23MQTd9XFIHA.5228@TK2MSFTNGP05.phx.gbl...
>
> "IdleBrain" <indianmostwanted@yahoo.com> ha scritto nel messaggio 
> news:1193148062.958479.125000@z24g2000prh.googlegroups.com...
>
>> I am serious about MFC and so I started
>> working on it.But it takes time, doesn't it?
>
> Yes, it takes time.
>
>> I always keep asking myself if C# would ever replace C++ and MFC and
>> make life easy for programmers.
>> But, I dont think it does..
>
> This topic has been discussed here several times.
>
> I think C# is just a tool different from native C++ and MFC.
> There is place for both.
>
> C# (or VB [*] ) and .NET are very powerful for Internet and web 
> applications, and also to develop tools quickly.
>
> If you want high performance, you should go native with C++. And MFC is a 
> good framework for C++ and Windows programming, especially thanks to 
> community contributions to jewel sites like CodeProject ( 
> http://www.codeproject.com - you will found tons of great MFC stuff on 
> it!).
>
> Moreover, as David pointed, there's no big difference between using += for 
> a delegate, or adding an MFC message map entry :)
> IMHO, what is important is clear *documentation* on how to do things, and 
> *tools* support.
>
> With Visual C++ 6 Microsoft built a great IDE for C++ and MFC development.
> Then the quality of the IDE for C++ decreased (e.g. they removed a great 
> tool called ClassWizard, who helped a lot with C++ and MFC).
>
> But now Microsoft is focused again on native C++ and MFC, so we can expect 
> great things in the future.
>
> Giovanni
>
> [*] IMHO, what really matters more than the languages is the *.NET 
> framework*. In fact, both C# and VB source codes are compiled targetting 
> the .NET framework, so it is more about syntax difference between C# and 
> VB. C# and VB share the same .NET framework, with the same class 
> libraries, and with the same power.
>
>
> 


0
tserface (3861)
10/24/2007 1:12:06 AM
The simple answer is to not use callbacks.  There is very little advantage to using
callback functions.  Why is WM_TIMER insufficient?
					joe

On Mon, 22 Oct 2007 08:23:31 -0700, IdleBrain <indianmostwanted@yahoo.com> wrote:

>Hi,
>I need a way to update an Edit control control in MFC from a timer
>callback function. How can that be done as we cannot reference dialog
>box controls from
>callbacks?
>
>Even the following code gives me problems:
>
>VOID CALLBACK TimerProc ( HWND hParent, UINT uMsg, UINT uEventID,
>DWORD dwTimer )
>{
>   //Add the text
>   CEdit *ptrtxtActivity;
>   ptrtxtActivity = reinterpret_cast<CEdit
>*>(GetDlgItem(hParent,txtboxActivity));
>   ptrtxtActivity->SetWindowText(text);
>}
>
>Please let me know,
>
>Thank you,
>IdleBrain
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
10/25/2007 12:22:43 AM
See below...
On Mon, 22 Oct 2007 11:02:37 -0700, IdleBrain <indianmostwanted@yahoo.com> wrote:

>Giovanni, thanks a lot for ur sample app. Your sample app works
>perfect.
>
>But, for some reason the OnTimer method in my project is still never
>called.
>Here is the code that I have been using:
>
>void CxDlg::OnBnClickedOk()
>{
>	CString strCurCaption;
>	GetDlgItem(IDOK)->GetWindowText(strCurCaption);
>
>	if(strCurCaption == "Start")
****
As a newbie, you should look out for traps like this.  For example, you are using "Start",
instead of _T("Start"), so you code is not Unicode-aware.  Also, you should worry about
issues such as internationalization; in other languages, the words are not "Start" and
"Stop".  

Tying this into the OK button is also dangerous.  If you want something to start and stop,
you should use a button other than OK
****
>	{
>		char c[] = "Stop";
>		CString strNewCaption(c);
****
There is no need to create a char variable (and you should think of char as an obsolete
data type used only in very, very, rare and exotic situations, and never for character
strings); you could have written
		CString NewCaption(_T("Stop"));
and not need the variable.  For that matter, there is no need to have a CString variable,
and you should also think of GetDlgItem as obsolete.  The correct approach would be to
create a control member variable to represent the button and you could do all of the above
as

	c_OK.SetWindowText(_(T"Stop"));
****
>		GetDlgItem(IDOK)->SetWindowText(strNewCaption);
>		utmrTx = SetTimer (1, 1000, NULL);
****
Don't use '1'.  Give the timer a name, like 
#define IDT_TIMER 1
and use the name
****
>	}
>	else
>	{
>		char c[] = "Start";
>		CString strNewCaption(c);
>		GetDlgItem(IDOK)->SetWindowText(strNewCaption);
>		// Stop the timer
****
Similarly, this would just be
		c_OK.SetWindowText(_T("Stop"));
****
>		KillTimer(utmrTx);
>	}
>}
>
>void CxDlg::OnTimer(UINT nIDEvent)
>{
>
>                //Do some stuff
>
>               //Restart the timer
>	CDialog::OnTimer(nIDEvent);
>}
>
>Let me know if you need more information.
>I really appreciate your help :)

****
Do you have an
ON_WM_TIMER()
in your Message Map?  Are you doing anything that will block the message pump?  Or do
Start and Stop just SetTimer/KillTimer?
					joe
****
>
>Idlebrain
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
10/25/2007 12:31:13 AM
You might want to check out my MVP Tips site.  Lots of stuff there, although some of it is
advanced, there's a lot of introductory material.
						joe

On Tue, 23 Oct 2007 07:01:02 -0700, IdleBrain <indianmostwanted@yahoo.com> wrote:

>Thanks for your input guys..I am serious about MFC and so I started
>working on it.But it takes time, doesn't it?
>Does Microsoft have any certification exams for C++?
>
>I always keep asking myself if C# would ever replace C++ and MFC and
>make life easy for programmers.
>But, I dont think it does..
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
10/25/2007 12:32:29 AM
Reply:

Similar Artilces:

GridView editing mode calling databind
I have a GridView that has about 500 rows in . The rows have a command field on it are editable. The problem is that everytime I press the edit button, it does a query of the database to get the same data it already has. This is slowing things down. I already have it going slow because it has to redraw the GridView to open up the row and display the textboxes. Is there a way to just move the data from the lables of that row to the text boxes and just display the changed row and not go the database? Thanks, Tom On Feb 10, 12:26=A0am, "tshad" <t...@d...

Edit a group of cells with a macro
I have imported data from another program which combines numeric and alpha characters into a single cell. I need to split the numeric data into one column and the alpha characters into an adjacent column. I copied the imported column into the adjacent column, then went to first column and created a macro which deletes the first 7 characters (the numeric values). When I run the macro on other cells it takes the information from the very first cell and keeps repeating it. What am I doing wrong? Hi! Can you post a few examples of the data you want to separate? Al -- Message posted from h...

Make text boxes the same height
I have 3 seperate text boxes that are side by side on a report, they vary in height and can grow, I want to put a solid box around each but I want them all to default to the tallest so as they look uniform when printed. I have spent a long time looking at other posts and trying some OnPrint event procedures but with no luck so far. I hope someone can help, thanks in advance Open your report in Design View and right click on your textbox and open the properties. Under the Format tab you will see a Width and Height field. These are the fields to adjust your textbox. If you hold down the ...

Keeping focus on a text box
I have a form on which I'm using my own record selector buttons to move between records. I'd like to use some code to keep focus on a particular text box (ItemNum) when moving between records if ItemNum had the focus prior to moving to the next record. ItemNum is not the default 1st Text box on the form. Any suggestions? Thanks Kevin D "Kevin D." <KevinD@discussions.microsoft.com> wrote in message news:BF2CEF17-ADA7-4253-8CDD-DB2AC3DD5117@microsoft.com... > I have a form on which I'm using my own record selector buttons to move > between records. I...

Extract text content from MS office files
Hi, I want to extract text content MS-OFFICE documents like word, ppt, xls... Plz gimme some tips. Regard Jack ...

Merge text stacked upon an object into one picture?
I placed a graphic (vinal record disc) then stacked text upon it via text boxes. Can they be merged into one copyable picture? What version Publisher? Group the objects, right-click, save as picture. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Chiefhollis" <Chiefhollis@discussions.microsoft.com> wrote in message news:901225A7-9A8E-4046-BF7A-5FF17E06CB6D@microsoft.com... >I placed a graphic (vinal record disc) then stacked text upon it via text > boxes. Can they be merged into one copyable picture? It ...

Windows update
Hi all I plan to fix the code at the link below and use it to audit and analyze windows updates on a large fleet of laptops (around 1000). http://www.vbaexpress.com/kb/getarticle.php?kb_id=806 My plan is to store everything in a table but it would be nice to retain raw data each time a laptop is audited (replace if one exists). How will Excel handle that many sheets (Atom processor; 2ghz Ram; Windows 7)? -- Steve I just ran the code from your link and it ran without a hitch. It wrote six columns with 700 rows. It looks like the Description column can be omitted. ...

Strike through text in Publisher 2003
I'm new to this product- how do I get strike through text? I've tried importing a style from Word but the formatting gets stripped out. Any help appreciated to meet a deadline! Microsoft decided you no longer needed Strike-through and removed it. Who do you think you are questing the decisions Microsoft make in your interest, and secondly, do you honestly really expect software programs from the same company to be compatible - unbelievable if you do and also believe in quality control. -- MSN supports racism and discrimination against indigenous Australians and Chinese. "I...

Money 2006 Canadian Edition won't Forcast CashFlow they removed the feature unannounced this year
Hello, I am having fun ... microsoft has made the US deluxe version incompatable with the Canadian version of Money and as of yet they are not producing a Deluxe version for Canadian users. Every two years I get the new version of MS Money for Canadian users and this year they decided to pull out the 'forecast cashflow' feature unannounced. That feature was the main reason (only reason almost) that I was purchasing MS Money. I have gotten useful reports out of MS Money 2006 Canadian version, but every time I restart it the useful reports seem to get deleted from my favorites ...

insert blank line when text changes
Hi, I was wondering if there was a way to write a macro or something else... so while scrolling down a list everytime the text changes (in this case a name) a blank line would be inserted. Hi try the following macro. It tests column A and inserts a blank row if the values change Sub insert_rows() Dim lastrow As Long Dim row_index As Long lastrow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).row For row_index = lastrow - 1 To 1 Step -1 If Cells(row_index, "A").Value <> Cells(row_index + 1, "A").Value Then Cells(row_index + 1, "A").Ent...

Access
Hi, i have a on going database for my employees and i would like to add another column employee ID number. On the existing table the column employee ID is there but no number associated to the employee. I want to import from excel. the excel file has all employees name and employee number. EE name is the primary key and i only want to import the EE ID number only, the rest of the column in the table leave as is. can someone help me with this? thanks On Tue, 18 May 2010 00:44:55 GMT, "accessnote" <u60148@uwe> wrote: >Hi, i have a on going database for my ...

Flashing Text
How can I make a text flash RED when say a cell is negative? :confused: j ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ I don't think you can, and why ever would you want to? It would drive people nuts, and is not a good design principle. You could make the background or foreground red by using Conditional Formatting. You will find it under the Format menu. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from t...

Static Control Curiosity
I noticed that if one gives a static control a unique ID, it will offer a BN_CLICKED event. It doesn't, however, respond. The MESSAGE_MAP does have what appears to be an appropriate entry. How, if at all, can one bring this control to life? Motivation: though almost all other functionality is gone, this would be an easy way to color a "button". Balboos "Balboos" <balboos@masonicbrother.com.No.Spam> wrote in message news:%Sffc.40827$467.10202411@news4.srv.hcvlny.cv.net... > I noticed that if one gives a static control a unique ID, it will offer > a ...

INDEX-MATCH with cell text driven names
Hi, I've read through a few posts that are close to what I'm trying to do but i can't get it to work. I'm constructing a fantasy F1 spreadsheet while i'm bored off work sick. Sheetnames in workbook DriverSummary, AUS, MAL, CHN, BHR,.....for each round/country of the season. Each sheet race sheet has a column for car number in called AUSarray, MALarray etc. AUSREF is cell A1 on the race sheets My current formula in the diver summary works well and is shown below. I have N() to return 0 when a race hasn't happened yet so that my sum() works. =N(OFFSET(AUSREF;MATCH($A4;AUS...

stock quotes won't update
I have a real tough time downloading my stock quotes. Often they won't download on the first, second or even third time I try, if at all. Yet if I go to the "read call summary messages" page, the money updates are always checked off, with the proper date and time. This is getting very frustrating, it has been happening for a long, long time. Any ideas, or is this just a poor Microsoft connection problem? I have no problem connecting to my email or other Web pages at the same time, so it is not my connection. I use Money 2004, Canadian version. Thanks, FJ Are all of the...

Incorrect "Updated" date on homepage
I download my accout info from my bank at least once a week. I'm wondering why I can't get the "Updated" date on the home page to update correctly. Both my checking and savings are from the same institution. The date for my savings account will update to the current day when I download the info. The date on my checking, however, will never update. I have checked to see that the account information is correct and it is. I've got everything filled in just as I do with my savings. Why the difference? What is Money actuallying using to update this date? Thanks...

Multiple windows updating multiple rows simultaneously ?
I'm maintaining an application that currently allows entry of new records or updating exisiting records. What would be involved in modifiying the application to allow multiple windows to be open simultaneously. In other words, if the user is updating or creating a record in one window, he can leave that window and go update another record in another window or create a new record in another window, returning to the other windows afterwards. How complex would this be to handle? Thanks in advance for any help. Yes, I guess that's what it would amount to. "SteveM" wrote...

Update back-end tables, fields, relationships etc...
I am looking for some examples of code or links to code examples to update a back-end database appropriately so it works with the next version of the front-end. Both dbs are Access2007, Example: I have a table tblPreference in the back-end that has a versionNumber field and is set to "1.0". If my latest "2.0" front-end is opened I want it to detect the OLD version 1.0 back-end and run the code to update the back-end to "2.0" and then change the version number. Things I need done include: - adding fields to existing tables - deleting fields from ...

Event 9790 appears after DST update
enviornment: Running Wk23 Ent. SP1 with W2k3 Exchange Ent. SP2 All of a sudden after applying kb926666 my Application Log is full of the following entry: Event Type: Information Event Source: MSExchangeIS Mailbox Store Event Category: Background Cleanup Event ID: 9790 Date: 3/6/2007 Time: 9:16:08 AM User: N/A Computer: <mailserver> Description: Cleanup of the DeliveredTo table for database 'First Storage Group\<mailstore>' was successful. 13 entries were purged. There are numerous Event 9790 entries for my mailstores and its causing some lag issues. Is there anyt...

bubble chart
Hi ... Have about 10 bubbles there. Need to format data labels of ALL 10 bubbles at the same time. (I wanna select Alignment > label position > center, that means moving all 10 data labels to the center of the bubbles) Any method that i can do it in one go, without the need to select and format it one by one ? Using Excel 2002. Thanks. Hi, If the bubbles are all different series then no. You can reduce the time by using F4 which will repeat the command. So format one data label and then select another and press F4. Cheers Andy dstdst123@excite.com wrote: > Hi ... > >...

Problem updating Service reference
Hello, I have a vb2008 solution with a WCF service project and UI project, the service project and UI project has a reference to a core project, that's project has one class usable for UI and service and referenced into all, went I try to update a service reference in UI project, appears a new datasource in service reference / Reference.svcmap, into UI project the calls to common class appears with at "not a member" error, and the cast lines between types of service core class and ui core class fails with "cannot be converted to" error because ui cla...

using an update query to create records within a date period
I plan our events using Access. At the moment when I'm given the dates for an event e.g. 1st July to 17th July I have to manually create a new record for each day. Is there any way in an update query I could type in my constants (event type, event name, event location) and the start date and the end date and create records for all of the days between the start and end date? If there is, I have no idea what to set the "update to" and "criteria" to? Any help would be greatly appreciated. JAMES On Jul 26, 11:12 am, James Frater <JamesFra...@discussions.micros...

Missing email content, body text, from etc
I have one user on our exchange 5.0 system thats having some weird problems. We have a exchange 5.0 box that handles internal mail. We also have pop accounts with our ISP. In the client (Outlook 2000) I get the pop account to drop all the pop email into the exchange mailbox. Everything seems to be working okay from inside the network. We have another building with computers setup. This computers (XP) have a vpn connection and outlook XP set up the same as it would be on the internal network. Users connect via the vpn connection and then open outlook. It shows their exchange box and also coll...

In query how to write group into the same minute? Export to text file?
Hi How can I in a Query write the criteria so that it groups the data from witin every minute? For example many trades that are made in the same minute compressed into that minute (and the analysis will be done in other fields, like: first, high, low, last, sum). And how can I export the result from a query into a testfile? Regards Rolf On Fri, 5 Feb 2010 00:05:00 +0100, "Rolf" <rolfe@algonet.se> wrote: >Hi >How can I in a Query write the criteria so that it groups the data from >witin every minute? For example many trades that are made in the ...

Convert number to text
I have a cell with a number in it 1-10 I want to convert that to text like person1 - person10. I have tried all sorts of formula but not quite got there yet. Any ideas fellas? Thanks in advance. Hi, try ="Person"&" "&TRIM(LEFT(F8,FIND("-",F8)-1))&" - "&"Person"&" "&MID(F8,SEARCH("-",F8)+1,3) "Brookyboy" wrote: > I have a cell with a number in it 1-10 > I want to convert that to text like person1 - person10. > I have tried all sorts of formula but not quite got t...