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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing a field parameter from a unbound box. 1

Status
Not open for further replies.

JamesBBB

Technical User
Nov 2, 2005
74
GB
Hi All,

For a training exercise I would like to be able to type a parameter change command into an unbound box, and then on after update, make the contents of the unbound box execute.

An example would be like, for instance, on the form is a text box called Text1 and I wanted to change the backcolor of Text1.

So in the unbound box I would type “[text1].backcolor = 255” and then on the after update this command would execute.

Any ideas, I’m completely stumped.

Thanks

James
 
I do not think you can do this with one textbox, without a lot of code, as Eval won't work for this. You could use Eval with a function, but this might be confusing for users. Peraps you could consider three textboxes?

[tt]Me.Controls(Me.txtControl).Properties(Me.cboProperty) = Me.txtValue[/tt]


Code:
Private Sub txtControl_AfterUpdate()
For Each prp In Me.Controls(Me.txtControl).Properties
    strProps = strProps & ";" & prp.Name
Next
Me.cboProperty.RowSourceType = "Value List"
Me.cboProperty.RowSource = Mid(strProps, 2)
End Sub
 
Thanks for the Post Remou

Apologies for not replying earlier, bit I have been away on a short break.

I'll check it out this weekend and see if I can get it working

Many thanks

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top