Quote Originally Posted by DataMiser View Post
Well you are not testing it where you add a record

Code:
Dim CategoryRS
Set CategoryRS = Server.CreateObject("ADODB.Recordset")
CategoryRS.Open "SELECT * FROM Type", Connect, 2, 3
CategoryRS.AddNew
CategoryRS("TypeName") = Request("TypeName")
CategoryRS("TypeColor") =Request("LinkColor")
CategoryRS.Update
You are testing it somewhere else but if you do not want the record added under these conditions then you need to test where you are adding the record.
Hi again..... soooo sorry but I am getting confused about what is where and seem to be going round in circles.... It may be that I have looked at it for so long I can't see the fault even if it jumped out at me.... frustrating ....yes! I modified this bit of code that I thought should do the job but again ... it doesn't. have you got any words of wisdom for me apart from 'go back to your hardware ' :-( I cant find any other code that may pass these details to the module for it to do the job

{
<%
Dim Flag, Query
' If the Category Name field is empty, and the form has been submitted:
If trim (Request("TypeName"))="" Then
If Flag Then
Response.Write "<p class='subtitle'>You must enter a category name.</p>"
Else
' If Flag isn't true, show the edit form:
Dim CategoryRS
Set CategoryRS = Server.CreateObject("ADODB.Recordset")
CategoryRS.Open "SELECT * FROM Type WHERE TypeId =" & Request("iType"), Connect, 2, 3
End If
%>

Many thanks again ...