using the format property of a text box.

EnglisAP

Registered User.
Local time
Today, 14:05
Joined
Dec 16, 2010
Messages
20
I am trying to format a text box so the item that is display currently a number will be preceded by another number to format it to my current standards.

Currently I have the input mask set to "4230000"0

this works for only one record the information for this text box is pulled off of a list box when i select one specific record it works but not for any other record in the list box

please help.
 
If I knew that every number would be prefixed by some fixed string, I would simply display that fixed string in a label in front of the text box. This is simple and avoids the myriad input mask and format problems I'd expect to encounter using other methods.
If that was not acceptable, I might prepend that fixed sting using code after the edittable portion is updated. Consider code like ...
Code:
private sub sometext_afterupdate()
  'prepends FS whenever the control is updated
  const FS as string = "423000-"
  me.sometext = FS & me.sometext
end sub
 
thank you with what you put i figured out how to do what i needed. by an chance would you know how to change the value in a listbox. i.e i have a checkbox and in the listbox it says true or false i want the if statement to make it so if false then change false to no. i tried this but its not working. code is below.
Code:
If Me.TicketSearchResults.Column(3) = False Then
    Me.TicketSearchResults.Column(3) = "No"
Else
    Me.TicketSearchResults.Column(3) = "Yes"
End If
 
I would do this when you first put the data into the list, not after the data is already there. Probably the list data comes from a query. I would change the output of that query to change the format of the data in the list.
Check out the RowSource property of the listbox control.
 

Users who are viewing this thread

Back
Top Bottom