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

Replacing a certain value in a form

Status
Not open for further replies.

WCL01

Technical User
Oct 24, 2008
34
US
I'm attempting to pulls in a number of records through my query into a form. However I have certain predetermined values that I would like to show up a certain way. As an example every time bob shows up in a particular field it replaces it with robert.
Is there a way to write in VB code into the form something like If field1 = "bob" then field1 = "robert". If so how would I go about putting it into the vb code so that when the report opens it performs this action and displays the info that I want on the report.
 
Better to make a table

fkName DisplayName
Bob Robert
Mike Michael
Dr Doctor


Now link to this table and use the display name. No code, and you can continually add without updating any code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top