Textbox

fenhow

Registered User.
Local time
Today, 12:42
Joined
Jul 21, 2004
Messages
599
Hi,

Can anyone tell me how to write the value of an unbound text box to a bound textbox on a form. I have this code and have put it into the after update event but it will not work, but if i add it to the on click event it does.

I want it to be automatic.

Private Sub Text573_AfterUpdate()
Me.Text570 = Me!Text573
End Sub

Thanks
Fen How
 
How is Text573? The AfterUpdate event will only fire if data is physically entered into it. If it's populated thru code, the AfterUpdate event would have to be explicitly called.

The question that has to be asked, though, is why you would have an unbound control and a bound control holding the same piece of data!
 
The question that has to be asked, though, is why you would have an unbound control and a bound control holding the same piece of data!
I was thinking the same thing...
smilequestion.jpg
 
Thanks, I have a formula that calculates a percent.

Bound data txtTractAcres, Bound Data txtPermittedAcres.

Unbound txtPercent (this is the % of the Tract Acres that is permitted)
=[TextTractAcres]/[TextPermittedAcres]

Unbound txtStatus (If Tract Acres is >1% Shows Yes, If Not Shows No)
=IIf([txtPercentPermitted]>0.01,"Yes","No")
Consequently this formula was working great and all of the sudden stopped working and keeps giving me an error. I need the txtBox to be a text not a number but it only gives me a number option in the properties.

I need this Yes or Now to be in a table so I can integrate it with my map.

Thanks.

Fen How
 
Hi, it is populated through code, how can I explicitly call it?

Thanks a lot.

Fen
 
After the code that assigns the calculation to the textbox, use something like this:

Call TextboxName_AfterUpdate
 

Users who are viewing this thread

Back
Top Bottom