 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 7th, 2006, 01:20 PM
|
|
Authorized User
|
|
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Access question
Anyone know a quick and easy way to alter the output of a value that a user sees? For instance after they do a query and get a table returned with the results can you make "Initial Specimen" = to just "I" ??
|
|

July 7th, 2006, 01:23 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
Are you wanting to change the value permanantly, or just for the users view?
If it is just the view, then set the source to =Left([FieldName], 1)
HTH
Mike
Mike
EchoVue.com
|
|

July 7th, 2006, 01:29 PM
|
|
Authorized User
|
|
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry I should have been more specific. This if for User view only not to effect the database. There are three possible values for this FieldName: "Initial Specimen";"Repeat Specimen";"Single Disease Only" and I want them to show up to the user as "I", "R", and "S" respectively.
|
|

July 7th, 2006, 01:32 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
OK, what I would do, is for the source of your form, link it to a query and set the field to something like
newFieldName: Left([FieldName], 1)
There are some other alternatives if you are storing those 3 values in a separate table.
Mike
Mike
EchoVue.com
|
|

July 7th, 2006, 01:39 PM
|
|
Authorized User
|
|
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It is being pulled by a Query. The Query references 3 seperate tables. The table that this value is pulled from is called tblDemographics.
I was hoping there would be some type of command line that would make say Initial Specimen = I in the click event.
|
|

July 7th, 2006, 01:43 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
OK, that works here, just look at the query and where you pull that field in, change it to
FieldName: Left([tblDemographics].[FieldName], 1)
This way the output of the query shows only the first letter, but the data in the field remains intact.
When you talk about the on_Click event, and having a command line, I am not sure exactly how or where you would implement this.
Mike
EchoVue.com
|
|

July 7th, 2006, 02:11 PM
|
|
Authorized User
|
|
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Im giving this a try thanks for the info! :)
|
|

July 10th, 2006, 08:23 AM
|
|
Authorized User
|
|
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have tried putting this in the field value of the query and I keep getting a syntax error:
DG_SpecimenType: Left([tblDemographics].[DG_SpecimenType], 1)
|
|
 |