Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text-box value

Status
Not open for further replies.

Richey

Technical User
Aug 29, 2000
121
GB
I have a text-box, sus_fp, the value of which I want to come from a calculated control on another form, Text107. Any ideas?

Ta very much
 
Is sus_fp bound to a field in your form's record source? Most likely it is. Otherwise sticking a value in it wouldn't accomplish anything, unless you save it somewhere later.

But if it's bound to a field, you want the value to come from the underlying table or query, or from Text107, depending on circumstance. What is that circumstance?

Typically, you might want the value to come from Text107 when a new record is added. In that case, the best thing to do is copy the value in Text107's AfterUpdate event procedure, like this:
Private Sub Text107_AfterUpdate
If Me.NewRec Then Me!sus_fp = Me!Text107
End Sub

The NewRec property is True when the current record is being added. So when Text107 is updated in a new record, it's value will be put in sus_fp. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top