Wrox Programmer Forums
|
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
 
Old July 7th, 2006, 01:20 PM
Authorized User
 
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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" ??

 
Old July 7th, 2006, 01:23 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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
 
Old July 7th, 2006, 01:29 PM
Authorized User
 
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


 
Old July 7th, 2006, 01:32 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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
 
Old July 7th, 2006, 01:39 PM
Authorized User
 
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old July 7th, 2006, 01:43 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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
 
Old July 7th, 2006, 02:11 PM
Authorized User
 
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Im giving this a try thanks for the info! :)

 
Old July 10th, 2006, 08:23 AM
Authorized User
 
Join Date: Jul 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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)








Similar Threads
Thread Thread Starter Forum Replies Last Post
Access security question kuznickic Access 2 August 4th, 2008 01:22 PM
access question angelboy SQL Language 3 April 18th, 2007 06:27 AM
Best way to access data.... question flyin ADO.NET 7 March 24th, 2004 07:20 PM
Access alias question badgolfer Access 2 December 15th, 2003 04:47 AM
Access alias question badgolfer VB Databases Basics 1 December 12th, 2003 11:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.