473,785 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please Help, Need Change Text Values For a Field in a Table

26 New Member
Hi

In my database, I use data that is imported XML data. One of the feilds in my table has text data defined with only two values -->"1" and "2". These are text values which have specific meaning.

Let say, "1" means "employed" and "2" means "unemployed ". I would like to convert the "1" and "2" values to "employed" and "unemployed " for the feild in the table.

I tried using the IIF Function, but because it is used with numerical values, it doesn't work for me. I am not opposed to creating a new table to do this, just not sure how to change the values. Any assistance would be genuinely appreciated.
Jan 24 '08 #1
5 1339
Dököll
2,364 Recognized Expert Top Contributor
Hi

In my database, I use data that is imported XML data. One of the feilds in my table has text data defined with only two values -->"1" and "2". These are text values which have specific meaning.

Let say, "1" means "employed" and "2" means "unemployed ". I would like to convert the "1" and "2" values to "employed" and "unemployed " for the feild in the table.

I tried using the IIF Function, but because it is used with numerical values, it doesn't work for me. I am not opposed to creating a new table to do this, just not sure how to change the values. Any assistance would be genuinely appreciated.
Hey ALaurie10!

Do a quick search here for Iff function or NZ. Please forgive me, I am currently in class. But I believe there are a number of posts here on this, perhaps some even by myself.

Please have a look, and stay tuned if no go or Google it:-)

Good luck!
Jan 24 '08 #2
Dököll
2,364 Recognized Expert Top Contributor
Hey ALaurie10!

Do a quick search here for Iff function or NZ. Please forgive me, I am currently in class. But I believe there are a number of posts here on this, perhaps some even by myself.

Please have a look, and stay tuned if no go or Google it:-)

Good luck!
I believe it's:

Expand|Select|Wrap|Line Numbers
  1.  
  2. IIf([YourField]= 1, "Employed", "Unemployed")
  3.  
  4.  
Might need to get rid of the quotes, try w/without.

In this case though, the 1 and the 2 would need to be in the same field

YourFiled = 1 or 2

Bye bye!
Jan 24 '08 #3
missinglinq
3,532 Recognized Expert Specialist
Since the 1 or 2 are text, per the OP, the syntax needs to be

IIf([YourField] = "1", "Employed", "Unemployed ")

with quotes around the 1, but the question remains how to get this into the table, instead of the 1 or the 2.

One way would be to not put it in the table, but rather have it in a calculated field in a query based on the table, then use the query as a basis for forms/reports. Forms and reports should really be based on queries anyway, even if only a single table is involved. In the query you'd create a new field with something like

EmploymentStatu s: IIf([YourField] = "1", "Employed", "Unemployed ")

then refer to the field EmploymentStatu s when you want to see Employed or Unemployed.

Linq ;0)>
Jan 24 '08 #4
ALaurie10
26 New Member
Thank you both, I am going to try both. Thanks again.
Feb 11 '08 #5
hjozinovic
167 New Member
hey Laurie!

I believe the easiest way for you is to use an Update query.
Just type Update query in your help in Access and you will find explanation and examples there.

This query is supposed to select all the values from your table that match a certain criterion, and then to change those valus (text) to some other text that you put in the -Update to- row in query design.

Hope this helps
Feb 11 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2380
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta http-equiv="Content-Type" content="text/html;
7
3615
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
9
2414
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a single string separated by a user defined character. There is no error trapping (by design), USE AT YOUR OWN RISK.
4
4620
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box bound to a table as a lookup, drawing values from another table to populate the available selections. This all worked fine in VB6. I have distilled the problem down to a simple form drawing data from the Northwind database for a representative...
1
9654
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
9
6769
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
47
2887
by: Jo | last post by:
Hi there, I'm Jo and it's the first time I've posted here. I'm in process of creating a database at work and have come a little unstuck.....I'm a bit of a novice and wondered if anyone could help. I work in a library and send out dual language books to babies of dual or other nationality. The db is to be used for logging a range of book titles and numbers ordered and books sent out to individuals. I am trying to work out a way of...
2
2225
by: cephal0n | last post by:
I have this peroblem thats really bugging me for days, please have a patience to read it and help me find the probplem because I knew I missed it and just cant tell where. I have a table named tblProuctSummary and it has the 6 fields: ItemID - for unique key BuyerA - for those who made the buying BuyerB - for another buyer Manufacturer -for identifying the source Sold - for sold items = 1 Date - when it was sold ...
4
6341
by: mattehz | last post by:
Hey there, I am trying to upload old source files and came across these errors: Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_html.php on line 59 Notice: Undefined index: args in /home/mattehz/public_html/acssr/trunk/inc_error.php on line 92 Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_error.php on line 92
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10087
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.