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

affect format of text-box dependent on user choice

Status
Not open for further replies.

Richey

Technical User
Aug 29, 2000
121
GB
Hi

I have a form whereby the user choose either Percent, Yes/No or Currency.
They then open a pop-up form which has text-boxes bound to another table. I'd like to be able to say, dependent on what the user has chosen on the other form, affect ALL text-boxes to Percent, Yes/No or Currency for viewing.

Is there a way to do this please?

Thnaks

 
To give your 'things' some names :-

Original form = frmStart
Original control where user picks option ( combo box ? ) = cboFormat

Then in the popup form's On_Load event put the code

ControlName.Format = Forms!frmStart!cboFormat
repeat for each control that you want to set the format on.


If you have a lot of text box controls and the ALL need setting up then you could use a FOR EACH loop

Dim ctrl As Control
For Each ctrl In Me.Controls
If ctrl.ControlType = acTextBox Then
ctrl.Format = Forms!frmStart!cboFormat
End If
Next ctrl



QED.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top