473,396 Members | 1,997 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,396 software developers and data experts.

Expressions in Access 2007

I am trying to write an expression where if a certain field is answered NO than another filed automatically populates Null or N/A. Can anybody help me? Thanks
Dec 3 '10 #1
5 1948
NeoPa
32,556 Expert Mod 16PB
Populating another control (which is what you mean) is done most easily by setting the Default Value. As you only stipulate one logical situation, clearing the Default Value (so it's Null) would do you.

If your question makes more sense than it sounds, then you really need to ask the question you actually need an answer to.
Dec 5 '10 #2
Let me try to explain it differently. If field A is answered no then I want field B to be auto-populated to say NULL. Sometimes field A will be yes and I will need to fill in field B with information. Does that make more sense?
Dec 6 '10 #3
NeoPa
32,556 Expert Mod 16PB
Tell me if the following explains your situation accurately :
[FieldA] is a Boolean which can take Yes or No as values.
When [FieldA] is Yes, whether it has been changed to that in the form or it was a pre-existing value from the record, [FieldB] should be set to Null as well as being locked so that the operator cannot change it.
When [FieldA] is No, whether it has been changed to that in the form or it was a pre-existing value from the record, [FieldB] should be unlocked so that the operator can enter a value in should they wish.

PS. Please also explain the control type used for [FieldA] on your form. I guess it's probably a CheckBox, but require confirmation.
Dec 6 '10 #4
[Field A] is a look-up (text) field with a possible answer of yes or no. If I select yes I want [Field B] to gray out, say Null, N/A (any of those would work). If I answer yes to [Field A] I just want to type information into [Field B]. So that when I go back to my database it does not look like I have empty boxes that need to be completed
Dec 6 '10 #5
NeoPa
32,556 Expert Mod 16PB
Melissa, I found your explanations incomplete logically, hence I asked a clear yes/no question. I really need such a straightforward answer to enable me to continue. If you feel that my explanation is quite close but not quite on the button, please give a Yes but, with a qualifier explaining the exact difference. Otherwise either Yes or No is required.

The question in the PS is answered however, as you mention the control is a TextBox. We can at least progress with this.

It seems extraordinary to me that a boolean value is treated as a string. This means that you must have (and I need you to tell me all about how you configured it.) set up the control such that other values are blocked. In case you're interested, the normal way to manage a boolean value on a form is to use a CheckBox control. CheckBox controls have values of TRUE or FALSE only. TextBoxes have string values instead. Entirely inappropriate for booleans and not as straightforward to manage.
Dec 7 '10 #6

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

Similar topics

27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
1
by: Bob Alston | last post by:
Anyone know of any features of the new Access 2007 that will improve on the ability of Access to work in a web environment??? Bob
1
prn
by: prn | last post by:
Hi folks, I'm relatively new to Access, but I seem to have drawn the short straw, so I have the assignment for my workplace of looking for problems/inconsistencies in migrating applications to...
5
by: ARC | last post by:
Hello, A user posted a reply to a post of mine regarding the fact that Access 2007 would be free, or maybe I misunderstood? All I could find on Microsoft's site was information regarding the...
17
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
4
by: Neil | last post by:
Just found out that the Microsoft Rich Textbox does not support full text justification, since it's based on Version 1.0 of the RichEdit Window Class, and full text justification is only available...
2
by: ARC | last post by:
Just curious if anyone is having issues with Acc 2007 once the number of objects and complexity increases? I have a fairly large app, with many linked tables, 100's of forms, queries, reports, and...
10
by: Arno R | last post by:
Hi all, So I bought a new laptop 10 days ago to test my apps with Vista. (home premium) Apparently Office 2007 is pre-installed. (a time limited but complete test version, no SP1) So I take the...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
1
by: ARC | last post by:
I think I made a major blunder, and now Access 2007 no longer opens. I made the mistake yesterday of using the "test" option in wise installer for my Access 2007 runtime app. It actually installed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.