Text Box

Nelson Bile

Registered User.
Local time
Today, 16:39
Joined
Apr 30, 2003
Messages
12
:confused:
I wrote several Text Boxes with the following command:
=[Date1]-[Date2] or =Date(), etc. In some of them I can have the correct results, in some of them I have the expression #Name?
What I did wrong?? Do I have too much data on the form?


Nelson:confused:
 
The textbox is bound to a field not in the table or query binding your form.
 
Thanks for your quick response!!!
What I have notice is that if I use conditional formating on the textbox, then I get the error #Name?. But if I don't use it, I don't have this problem!!!
I'm adding condition on each textbox to color the number depending on how long is the time.
Any suggestions???
Nelson:rolleyes:
 
The number of text boxes you have and whether you're using the same test/result for each?

One solution is to test the value of each textbox on the AfterUpdate event and changing the forecolor(?) appropriately. This could be done with a function if you want the same color for each and the color to appear OnUpdate event.
 
Thanks again!!!
It looks easy but I don't know how to do it!!!!
I've tried with no results. Thats why I'm asking for help.
Any suggestion???
Nelson
 
For textBox txtData, on event txtData AfTerUpdate,

Private Sub txtData_AfterUpdate()
If Me!txtData < 10 Then
Me!txtData.ForeColor = vbRed
ElseIf Me!txtData < 20 Then
Me!txtData.ForeColor = vbBlue
ElseIf Me!txtData < 30 Then
Me!txtData.ForeColor = vbGreen
End If
End Sub
 
Thanks again!!!
:(
This is what i did
I click on the Text Box: text1561, where I have a control source=[db2]-[date4]
I open the Microsoft Vissual Basic, and I select text1561 and afterupdate. This is what I wrote:

Private Sub Text1561_AfterUpdate()
If Me!Text1561<1 Then
Me!Text1561.ForeColor=vbRed
Else if Me!Text1561>2 Then
Me!Text1561.ForeColor=vbBlue
Else if Me!Text1561=2 Then
Me!Text1561.ForeColor=vbBlack
End If

End Sub


After I wrote this, I'm still getting the same color!!!!
I gott another problem: I can't add data on the table but everytime I open the form, I have "0" records!!!!
I don't know what I did!!!!!!!

Patient enough to still give me other suggestion??
:D
 

Users who are viewing this thread

Back
Top Bottom