473,763 Members | 7,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validation and adding to a form

173 New Member
i need help!!!!!!!

Has any1 got examples of the following that i can view:

1) simple form field Validations

2) Adding to a database using a form with a adding button

??????

i just need a few examples so i can work from them.

Ur responses will be appreciated.
Nov 16 '06 #1
6 1321
nico5038
3,080 Recognized Expert Specialist
Hi Beany, I have some samples at:
www.geocities.c om/nico5038
Especially the "Add" form of the "Datasheet with Filter samples" will show you how to check a form before saving the correct values.
Let me know or you need more.

Nic;o)
Nov 16 '06 #2
missinglinq
3,532 Recognized Expert Specialist
Here's a couple of generic field validation hacks. The Cancel = True places the cursor back into the offending field if the data entered isn't appropriate.

Expand|Select|Wrap|Line Numbers
  1. 'Checks if a field has been left empty
  2. Private Sub YourField_BeforeUpdate(Cancel As Integer)
  3.   If IsNull(Me.YourField.Value) Then
  4.      MsgBox "You Must Enter Data In This Field!!!"
  5.      Cancel = True
  6.    End If
  7. End Sub 
  8.  
  9. 'Checks to see if the value entered is Numeric
  10. Private Sub YourField_BeforeUpdate(Cancel As Integer)
  11.   If Not IsNumreic(Me.YourField.Value) Then
  12.     MsgBox "You Must Enter Numbers Only In This Field!!!"
  13.     Cancel = True
  14.   End If
  15. End Sub 
  16.  
  17.  
Nov 16 '06 #3
Beany
173 New Member
thanks peeps.......... .


but nico........... .. i cant open ur files, they are showing as read-only and ive got access 2003, and it wont open it!
Nov 16 '06 #4
nico5038
3,080 Recognized Expert Specialist
When opening for the first time in A2003 you need to accept the Conversion option.
Afterwards (when having it in ReadOnly mode) use the Database menu and select the "convert to" option to get an A2003 format.
You'll also have to open the Tools/References, when in VBA code, and uncheck the "Microsoft Active Data Objects" and check the "Microsoft DAO version #.##" library.

Nic;o)
Nov 16 '06 #5
NeoPa
32,572 Recognized Expert Moderator MVP
Nic;0),

If, as I hope (I like your style), we are going to see more of you in these forums, you may want to know that currently, posting links won't work correctly on the original post.
An edited post will automatically be converted for you though.
To get around this use the [u r l] tags.
Format (lose the spaces) :
[u r l=actual link]Name to Show[/u r l]
or
[u r l]actual link[/u r l]
Nov 17 '06 #6
nico5038
3,080 Recognized Expert Specialist
Pleased to meet you and thanks for your kind words NeoPa :-)
Learning some new html tricks too, still trying to finding my way here, but it's getting easier by the post.

Nic;o)
(BTW this is my "tag" my real name is just Nico)
Nov 17 '06 #7

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

Similar topics

6
2199
by: Hernán Castelo | last post by:
should i to validate all the "Request"s calls like Request.FORM("...") and Request.Cookies("...") ???? if it is so, i have to see inside every "Input" elements like "Text" and even "Hidden" and every Request.Cookies i'm using ??? thanks
72
5225
by: Stephen Poley | last post by:
I have quite often (as have probably many of you) come across HTML forms with irritating bits of Javascript attached. The last straw on this particular camel's back was a large form I was asked to complete in connection with attendance at a seminar. After spending more than 15 minutes on it, I clicked on the submit button - and nothing happened. Looking round the pages on Javascript form validation that Google produced for me (well,...
3
3041
by: CJM | last post by:
I'm adding some extra features to an intranet-based ASP application...(IE6 clients) As part of the process, I thought I would give the html a mid-life upgrade, ie. remove much of the tag-soup, replace with CSS and validate. I haven't got much time to spend perfecting it, but I thought with a little bit of effort I could transform the app into something approximating a professional application. The app use 3 frame layout: header,...
6
3709
by: Nedu N | last post by:
Hi, I want to have confirmation(Yes/No) on a button of the webform in which there are many validation controls. I want all the validation controls to be triggered first and then Yes/No confirmation message. By adding just an confirm attribute for 'onclick' event of the button doesn't work with validation controls. Is there any short way to go around this. Thanks Nedu
2
2685
by: Dnna | last post by:
I have a table which is bound to an Internet Explorer XML data island. I'm using ASP.NET's client-side validators for an input field in the table. The problem is that if the input fields are in a table that is bound to the island (such that the rows are dynamically generated by IE from the XML data island), the validators do not work. If the table is not bound, the validators do work, but then I don't have the table iterating through...
4
1428
by: andersoj | last post by:
I have a page that has some required field validators created in the aspx, and other validators created in the Page_Load event. In IE, all validation works as expected. In Firefox, ASPX validators work fine, but the validators created in the code-behind do not. Am I adding the validators to the wrong control on the page? Right now I'm finding the main form control and adding them to that. Adding to Page.Validators didn't work.
9
4180
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be honest I usually hire someone to do it for me, grab predone scripts and kind of hack out the parts that I need, or just do very minimal validation (e.g. this is numeric, this is alpha-numeric, etc.)
11
3000
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether certain fields match certain criteria, and inform the user in different ways when the data is wrong (offcourse, this will be checked on posting the data again, but that's something I've got a lot of experience with). Now, offcourse it's...
10
5722
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the form the control is on? Basically I have a number of controls in a form that are required, and to check it I am setting the Validation Rule to "<>"IsNull" so that when the user tries to tab through/click out of a required area without entering...
3
2113
pradeepjain
by: pradeepjain | last post by:
hii guys , I wanna share a very gud ajax validation script with php... Ajax Form Validation - sForm | chains.ch weblog I am very new to ajax .So i wanna small help....i want to improve that script with adding checkbox,radiobutton validation and dropdown list validation . but i am not able to do it.....any one can add his/her code into that ajax script..tht i can have a look at it.. And i have found a small bug in tht script...
0
9563
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
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
9997
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...
1
9937
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7366
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
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
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.