473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Display text based on a field value

I am setting a yes/no field to identify if the record is open or closed. A yes/no field is either 0 or -1. How do I print the words OPEN or CLOSED on a form based on the yes/no value of the current record? I simply want to place the word OPEn or CLOSED at the top of the forms so I can scroll through them quickly and see their status. I would also like to list open ones versus closed ones.

Thank you for any help!

Robert
Sep 20 '06 #1
3 10090
MMcCarthy
14,534 Expert Mod 8TB
Put a textbox on the form and put the following code in the control source property

=IIf([YesNoFieldName]=0,"OPEN","CLOSED")


I am setting a yes/no field to identify if the record is open or closed. A yes/no field is either 0 or -1. How do I print the words OPEN or CLOSED on a form based on the yes/no value of the current record? I simply want to place the word OPEn or CLOSED at the top of the forms so I can scroll through them quickly and see their status. I would also like to list open ones versus closed ones.

Thank you for any help!

Robert
Sep 21 '06 #2
Put a textbox on the form and put the following code in the control source property

=IIf([YesNoFieldName]=0,"OPEN","CLOSED")
Thank You worked like a charm. I tried the IIf command but must not have had the format correct.

Now I have another problem, the form is only showing me 3 of the 10 records I have in the table. It was seeing all 10 before but I don't know why it is only seeing 3 now. I veiwed the table and all 10 records do exist. Any thoughts?
Sep 21 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
You must have place some criteria or filter on the forms records.

Check the query in the record source of the form and make sure it's set to return all the records you want.

Then check if there is a filter on the form.


Thank You worked like a charm. I tried the IIf command but must not have had the format correct.

Now I have another problem, the form is only showing me 3 of the 10 records I have in the table. It was seeing all 10 before but I don't know why it is only seeing 3 now. I veiwed the table and all 10 records do exist. Any thoughts?
Sep 21 '06 #4

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

Similar topics

1
by: John Davis | last post by:
I want to display credit card fields when the user selects the option paid membership. If user selects the option free membership, then the credit card text field will disappear. Here's the code I...
10
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
2
by: Marc | last post by:
I'm back in the Access development mode and seem to have forgotten how to do 2 things that should be simple. I have a database with a table of contacts, companies and activities. The idea is that...
2
by: Corepaul | last post by:
As input is typed into a text box, I would like to search a recordset for the first record that matches what has been typed so far. I would like to update the text box to display the letters typed...
8
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". ...
7
by: luanhoxung | last post by:
hi all!! i get small trouble in display a text box. My text box will be show a value string base on my combo box choice. But text box always get the same value when i choose a new value in combo...
5
by: Academia | last post by:
(If you've seen this in the drawing NG, sorry. I inadvertently sent it there.) I have a listbox populated with Objects. The Class has a String field that ToString returns. I assume that...
2
by: giandeo | last post by:
Hello all, It's almost a couple of weeks since i am struggling to get this code work. Unfortunately, i am stuck. There seems to be no hope... Please Help....... I am working with an asp page...
10
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.