Finding out required fields in Access through ASP.

Results 1 to 3 of 3

Thread: Finding out required fields in Access through ASP.

  1. #1
    Josh Patterson Guest

    Default Finding out required fields in Access through ASP.

    I need to find the required property/attribute in Access through ASP so as to check values from my form automatically for null values before they are submitted and crash the app. Ideas?<BR>Thanks...

  2. #2
    Jason Buck Guest

    Default RE: Finding out required fields in Access through

    This is something you have to do your self. <BR><BR>Use the following VBSCRIPT TO HELP YOU OUT.<BR><BR>The Form name is MYFORM. The Submit button name is SUBMIT.<BR><BR>&#060;SCRIPT LANGUAGE="VBScript"&#062; <BR><BR>Option Explicit<BR><BR>dim validation<BR><BR>dim header<BR><BR>header = "Job Jar"<BR><BR>Function MyForm_OnSubmit<BR>validation = True<BR><BR><BR>&#039----validating an item in a select field---------------<BR>If (Document.MyForm.sellawareaid.Value) = 21 Then<BR>MsgBox "Please Select the appropriate Law Area, If you do not know, Select Other",8, "Law Area"<BR><BR>validation = False<BR><BR>End If<BR><BR><BR>&#039-------validating a text field to make sure there is text----<BR>If (Document.MyForm.CliName.Value) = "" Then<BR>MsgBox "You must enter a Client Name before submitting",8, "Client Name"<BR><BR>validation = False<BR><BR>End If<BR><BR>&#039--------Validating a number field to make sure it is Numeric<BR>If IsNumeric(Document.MyForm.Clinum.Value) = False Then<BR>msgbox "Please Enter a Numeric Value for the Client Number",8, "Client Number"<BR><BR>validation = False<BR><BR>End if<BR>&#039------Validating a field for length<BR>If Len(Document.MyForm.Clinum.Value) &#060;&#062; 5 Then<BR>MsgBox "You must enter 5 digits the Client Number field",8, "Client Number"<BR><BR>validation = False<BR><BR>End If<BR><BR>&#039----Validating a field for date----------<BR>If IsDate(Document.MyForm.ProjectDueDate.Value) = False Then<BR>MsgBox "You must enter a Project Due Date in MM/DD/YY format",8, "Project Due Date"<BR><BR>validation = False<BR><BR>End If<BR><BR><BR><BR>If validation = True Then<BR>MyForm_OnSubmit = True<BR><BR>Else<BR><BR>MyForm_OnSubmit = False<BR><BR>End If<BR><BR>End Function<BR><BR>&#060;/SCRIPT&#062;<BR><BR>I hope that the above has help you. If not feel free to contact me.<BR><BR>Respectfully,<BR><BR>Jason<BR>Webmaster @wnj.com

  3. #3
    Josh Patterson Guest

    Default RE: Finding out required fields in Access through

    I meant the property/attribute of the Recordset Field that determined whether or not the Field in Access had to contain a value before the record can be initialized. (So as to check with access about which fields are required before you submit a batch of fields.) Thanks for your reply, but any ideas on this one?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •