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

Mixing imput masks

1
I am working with Access 2003. I have aclient who would like to have a field where the user can enter either a date or "N/A". I know how to do an input mask for either one but not both. Is there code I can write to to accomplish this? I know how to do the code for "N/A" but how do I add in the date part of it?

Thank you!

Troy
Jul 24 '08 #1
1 1097
PianoMan64
374 Expert 256MB
The String Value N/A is not supported in the Date/Time Field. If the value of the field is Null, you can have a conditional statement that can have the control on the form display N/A, but you can't store that value in the Table.

Example:

Expand|Select|Wrap|Line Numbers
  1.  
  2. =IIF(IsNull([BlankDateFieldControl]),"N/A",[DateField]))
  3.  
  4.  
You check the control on the form "BlankDateFieldControl" and see if it is Null, and if it is, then display N/A on loosing focus or whatever event would accommodate what you're trying to do.
Jul 25 '08 #2

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

Similar topics

0
by: Gianni Mariani | last post by:
Below is an example of how to do static type-checking of an erroneous set of input masks. The drawback is that it's a little too verbose and non-trivial to understand and to make it truly I'd...
2
by: Mark Lees | last post by:
I want to create an input mask for a phone number and I would like the area code to always be (801). However, I want the users to be able to edit it if necessary. Would it look like this =...
4
by: David W. Fenton | last post by:
I'm working on a subform where users put in 24-hour time. On their paper forms, they've been accustomed to referring to midnight as 24:00 (instead of as 0:00, which kind of makes sense from a human...
6
by: Regnab | last post by:
Morning All, I'm trying to ensure that when the user enters a number on a form, the database automatically leaves a space after the 3rd number. I've tried to do this using input masks, but when...
2
by: bobrics | last post by:
Hi, I am trying to understand what is wrong with my code. What I have below is a part of a linear feedback shift register. But it's simplified to the point where it does not matter. The main...
4
by: Dave | last post by:
Hello - Say I have a 32 bit value in data (v:4, r:4, l:8, p:16) unsigned char data; Now, for portabilities sake, I want to use shifts and masks to access these fields, instead of accessing...
3
by: Dave | last post by:
I need to rewrite the following using shifts and masks for portability sakes, and to get rid of the BYTE_ORDER issue. /* CODE */ struct test { #if BYTE_ORDER == BIG_ENDIAN unsigned char ...
10
by: noridotjabi | last post by:
I have often times seen masks used in C source code. I really don't understand the purpose or functionality of this. I have seen used: #define MASK 0x77 .... if(hello & MASK) Also I...
28
by: ziman137 | last post by:
Hello all, I have a question and am seeking for some advice. I am currently working to implement an algorithmic library. Because the performance is the most important factor in later...
12
by: panjap | last post by:
a few days a go i was kindly helped with the trouble i was having on editing lables wjhere i wanted to change access' messages to my own. Below si the qeustion i set a few days agoa , which worked...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.