473,657 Members | 2,530 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is It Possible To Write Sql In Data Validation Rule?

2 New Member
Hi,

I am new to SQL.

I am building a form to do data entry. I have some questions in the questionnaire like:
a). are you qualified?
b). if you are qualified, which level?

I want to restrict the data entry for question b only when answer in question a is "Yes".

I am not sure if I need to wrtie any SQL program or I can do that by clicking on "..." button in validation rule?

If it is possible to do, could anyone tell me how to do it?

Many thanks.
Fan
Feb 28 '07 #1
3 1681
vijaydiwakar
579 Contributor
Hi,

I am new to SQL.

I am building a form to do data entry. I have some questions in the questionnaire like:
a). are you qualified?
b). if you are qualified, which level?

I want to restrict the data entry for question b only when answer in question a is "Yes".

I am not sure if I need to wrtie any SQL program or I can do that by clicking on "..." button in validation rule?

If it is possible to do, could anyone tell me how to do it?

Many thanks.
Fan
u can apply validation before executing qry from frontend or u may use check option if ur using oracle
Feb 28 '07 #2
Fanyang
2 New Member
u can apply validation before executing qry from frontend or u may use check option if ur using oracle
Thank you so much, vijaydiwakar.

Sorry I don't quite understand your email. I am using ACCESS. Would you be able to tell me exactly what I need to do?
Feb 28 '07 #3
vijaydiwakar
579 Contributor
Thank you so much, vijaydiwakar.

Sorry I don't quite understand your email. I am using ACCESS. Would you be able to tell me exactly what I need to do?
u may first check if question is checked if yes then
create sql to execute
as
if question is checked then
dim ssql$
ssql="insert into <table>(<filedn ame>) values(<Field values>)"
conn.execute ssql
end if

it is not the pure code i'm giving u d blue print how to do so
Feb 28 '07 #4

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

Similar topics

4
2956
by: Mike | last post by:
Related to another topic I just posted, I wanted to discuss ways to optimize the validation of very large (>100MB) XML documents. First, I have no idea if something like this already exists; it may even be the typical implementation for all I know. At any rate, it occurs to me that the set of business rules that need to be validated against an XML document represent a limited set of nodes at any given time (while parsing through the...
2
2683
by: Joey P | last post by:
Hi all, I am doing a project for university whereby i have to implement a simple database related to a frozen foods company. I am having some trouble though creating a validation rule for one of my fields. I have a table called "Product" and two of the fields included in this table are "Cost Price" and "Retail Price". I need to create a validation rule so that the Cost Price is always less than the Retail Price. I have tried...
4
3483
by: fred | last post by:
I'm trying to validate data entered into a form field by using a Query. I've discovered that the validation rule is pretty useless if you need anything other than very basic validation. I've tried using the following After Update Code: Dim strSQL strSQL = "SELECT tblProducts.ProductSRP FROM tblProducts" strSQL = & "Where (((tblProducts.ProductID)=!!.!));
0
1803
by: Wayne Phipps | last post by:
Hi There, I want to be able to validate data entered by a user onto a form. Different fields will have different validation requirements. As an example, a text box may only allow numeric, alpha or alpha numeric entry and/or may have limitations on length or value. I thought about inheriting a control from one of the standard forms controls
4
2714
by: ron | last post by:
I have a access based guest book. I want to create a validation rule to block certain words or parts of a srting. How do i do this? ie: this is a nice site. come visit my porn site at www.abc.zy If the message contains the word porn, can I block the whole message using a validation rule
4
4251
by: kids_pro | last post by:
What is the different between Business rule & data validation? How much impact does it give in OOP concept? Thanks, Kid
9
3109
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to be inserted into a standard web address in the table (the filed name is link) in ddw1 Example address ---
15
12093
by: Mr.Tom.Willems | last post by:
Hello people, I am ussing an MS access database to enter and manage data from lab tests. until now i was the only one handeling the data so i had no need for a controle on how missing data was entered, since i did it myself i knew exactly what data was missing... The problem is that i can have data that hasn't been enterd yet, or data that is below detection level(so missing).
1
1761
by: DBlearner | last post by:
I'm surprised I couldnt find a question about this here so guess I better ask. I have a form with two date fields. and . Obviously, Enddate cannot predate Startdate field so I decided to do a validation rule for both fields. I selected the startdate field and inserted <= along with Validation text. Now, the strange thing is that no matter what date I select in the StartDate field, the validation rule fires and the Validation Text pops...
0
8325
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8844
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8621
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7354
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.