Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 7th, 2006, 01:20 PM
Authorized User
 
Join Date: Jul 2006
Location: , , .
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" ??

Reply With Quote
  #2 (permalink)  
Old July 7th, 2006, 01:23 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
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
Reply With Quote
  #3 (permalink)  
Old July 7th, 2006, 01:29 PM
Authorized User
 
Join Date: Jul 2006
Location: , , .
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.


Reply With Quote
  #4 (permalink)  
Old July 7th, 2006, 01:32 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
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
Reply With Quote
  #5 (permalink)  
Old July 7th, 2006, 01:39 PM
Authorized User
 
Join Date: Jul 2006
Location: , , .
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.

Reply With Quote
  #6 (permalink)  
Old July 7th, 2006, 01:43 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
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
Reply With Quote
  #7 (permalink)  
Old July 7th, 2006, 02:11 PM
Authorized User
 
Join Date: Jul 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #8 (permalink)  
Old July 10th, 2006, 08:23 AM
Authorized User
 
Join Date: Jul 2006
Location: , , .
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)



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:49 AM.


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