What I'm wanting to do should be very simple, but for the love of all things, I can't figure it out.
I have 3 textbox's on my MainForm:
txtTotalCharged
txtTotalPaid
txtAmountDue
The first 2 textbox's are calculations from Sub1 and Sub2 and Sub3.
What I am wanting to do is when txtAmountDue is > 0 then make txtAmountDue ForeColor be red. And then when it's < 0 make the ForeColor black.
As I Click on Each row in Sub1 to see what the txtAmountDue is on the MainForm, I want the txtAmountDue to reflect the right ForeColor. I have tried this using the If...Then Statement and Select Case. I don't know whether to place the code on MainForms OnCurrent Event or on Sub1 OnCurrent Event or on one of the textbox GotFocus Event within Sub1 or if I am writing the correct code at all.
I would prefer not to use the Conditional Formating button.
If someone could show me how to do this thru Code or point me towards a sample db, I would greatly appreciate it.
Thanks,
Tom
I have 3 textbox's on my MainForm:
txtTotalCharged
txtTotalPaid
txtAmountDue
The first 2 textbox's are calculations from Sub1 and Sub2 and Sub3.
What I am wanting to do is when txtAmountDue is > 0 then make txtAmountDue ForeColor be red. And then when it's < 0 make the ForeColor black.
As I Click on Each row in Sub1 to see what the txtAmountDue is on the MainForm, I want the txtAmountDue to reflect the right ForeColor. I have tried this using the If...Then Statement and Select Case. I don't know whether to place the code on MainForms OnCurrent Event or on Sub1 OnCurrent Event or on one of the textbox GotFocus Event within Sub1 or if I am writing the correct code at all.
I would prefer not to use the Conditional Formating button.
If someone could show me how to do this thru Code or point me towards a sample db, I would greatly appreciate it.
Thanks,
Tom