If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Column Validation
Hi,
I have a column which has a yes/no type field. Is it possible to perform some validation so that only one entry in the column can be set to 'yes'? Regards, Ron. |
#2
|
|||
|
|||
Column Validation
Assuming you're updating through a form, yes: you can put logic in the
form's BeforeUpdate event along the lines of: If DCount("*", "MyTable", "MyField Is True") 1 Then MsgBox "Too many checked" Cancel = True End If If you're wanting this on the table itself, no, it's not possible. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Ron" wrote in message ... Hi, I have a column which has a yes/no type field. Is it possible to perform some validation so that only one entry in the column can be set to 'yes'? Regards, Ron. |
#3
|
|||
|
|||
Column Validation
=?Utf-8?B?Um9u?= wrote in news:FCF66729-
: I have a column which has a yes/no type field. Is it possible to perform some validation so that only one entry in the column can be set to 'yes'? This sounds like a design problem. Shouldn't there be just one value pointing to the "yes" record..? Could be a value in another table, a database property, a control value or something. Just a thought Tim F |
#4
|
|||
|
|||
Column Validation
Sounds like you have a mutually exclusive value. For example, you have
colors - blue, red, green. Only one is valid. You would use one attribute rather than three to hold the information. You can use a combo to select the choice or if you have only a couple of options, you can use an option group. The option group will need to store a numeric value so whenever you need to display the chosen value, you need to use a combo or some code to convert the numeric value to text. "Ron" wrote in message ... Hi, I have a column which has a yes/no type field. Is it possible to perform some validation so that only one entry in the column can be set to 'yes'? Regards, Ron. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need to Improve Code Copying/Pasting Between Workbooks | David | General Discussion | 1 | January 6th, 2006 03:56 AM |
match and count words | David | Worksheet Functions | 5 | July 4th, 2005 02:24 AM |
Lookup Table Dilemma | Karen | Worksheet Functions | 2 | June 10th, 2005 08:22 PM |
unable to repair inobox | Sudheer Mumbai | General Discussion | 1 | February 20th, 2005 11:55 AM |
Column E cell contents added into Column D contents (not overwriting data but mixing) | creativetechguy | General Discussion | 2 | August 5th, 2004 07:32 PM |