Hi Everybody,
I want to be able to put a number in a txt box and if its between 5 and 9, for it to appear as a count in another txt box ie if the number inputed is 7 then 1 will appear in the second txt box, if 10 is inputed into the first txt box then 0 will appear in the second txt box.
Ive tried using an IIF statement in the second txt boxes control source but Im having problems declaring the "between" part my syntax so far....
IIF([KidsAges1]Between5And9,1,0)
Any help would be madly loved.
Cheers Eddie
4 5371
I want to be able to put a number in a txt box and if its between 5 and 9, for it to appear as a count in another txt box ie if the number inputed is 7 then 1 will appear in the second txt box, if 10 is inputed into the first txt box then 0 will appear in the second txt box.
Ive tried using an IIF statement in the second txt boxes control source but Im having problems declaring the "between" part my syntax so far....
IIF([KidsAges1]Between5And9,1,0)
Eddie,
I got it to work taking a bit of a different approach. I ran something like this in the AfterExit event of txtBox1... - If txtBox1>=5 Then
-
If txtBox1<= 9 Then
-
Me.txtBox2 = 1
-
Else:
-
Me.txtBox2 = 0
-
End If
-
End If
Hope that helps,
Brad.
Hi Everybody,
I want to be able to put a number in a txt box and if its between 5 and 9, for it to appear as a count in another txt box ie if the number inputed is 7 then 1 will appear in the second txt box, if 10 is inputed into the first txt box then 0 will appear in the second txt box.
Ive tried using an IIF statement in the second txt boxes control source but Im having problems declaring the "between" part my syntax so far....
IIF([KidsAges1]Between5And9,1,0)
Any help would be madly loved.
Cheers Eddie
how about -
IIF([KidsAges1]>=5 And [KidsAges1]<=9,1,0)
-
J
Even better J. That's why they pay you the BIG bucks! :)
Brad.
Thanks for your help guys, somtimes I dont see the forest for the trees.Cheers Ed
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Susie Swint |
last post by:
I have the following IIf statement which worked in Access 95 but will
not work in Access 2002. The error message I get is that the expression
is typed incorrectly, or is too complex to be...
|
by: Andy_Khosravi |
last post by:
I have been trying to build a user friendly search engine for a small
database I have created. I'm having some particular problems with one
of my date fields.
Here's the setup:
I'm using...
|
by: Jim Florence |
last post by:
Hello,
I've just started in ASP and I'm having a few teething problems. Initially I
tried to write out dates from the database using
<asp:Label runat="server" ID="Label6" Text='<%#...
|
by: Chris Waller |
last post by:
Dear All,
I am experiencing a problem with an IIF statement in Access. As I have never created one of these before I am having real problems getting my head around them. What I am trying to do is...
|
by: newnewbie |
last post by:
Have a nested IIF statement that works but returns wrong values....Here's the syntax:
Expr3: IIf(=2 Or 3,'valid',IIf(=4,'invalid','unknown'))
Needed:
if validity is 2 or 3 = Valid,
if...
|
by: towsie |
last post by:
Hi,
I am trying to add the following IIf statement to a query,
IIf(.=50,("-" & .),.)
The statement is supposed to make any value that has a posting key of...
|
by: Darknight850 |
last post by:
Hello Every One,
I am having a problem with an IIF statement in a query I have going. Before I start I would like to say I have had some problems in the past with supplying enough information, if...
|
by: ebasshead |
last post by:
Hi everybody,
On my form, I have a time field where the user enters a time, if the user enters a time between 4am and 12pm, I would like my "early checkin" check box to check itself. I thought the...
|
by: buddyr |
last post by:
example:
field1 bblandscape, wallmart, kmart
field2 4,6,9
field3 5,7,6
field4 12,0,5
field5
if field2 > field3 then field5 = "Yes"
if field4 = 0 then field5 = "Yes"
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |