Quote Originally Posted by davida1956 View Post
Well that didn't work dd it...

Hi again.... told you I was a newbie.... never thought to read the screen... hopefully this works :-)
Code:
<%
' *** Insert new category, name and link color to the database but allows it me to enter a blank field which it shouldn't ??:

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
If Not Trim("TypeName")=""Then
	CategoryRS.Addnew
	CategoryRS("TypeName").Value=Request("TypeName")
	CategoryRS.Update
'This message is working and displayed a little further down in the code	
	Response.write ("The Category Has Been Added To The Database")
Else
'This error message cannot be seen and no code error is thrown out in browser
	Response.write ("Not Added You must Enter A Valid Category Name")
End If
%>
              
              <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
                <tr> 
                  
                  <td align="left" valign="top"> 
                    <table width="100%" border="0" cellspacing="2" cellpadding="2">
                      <tr> 
                        <td align="center" valign="middle"><p class="textEvent">&nbsp;</p>
                        <p class="textEvent">The category " 
                          <% Response.Write Request("TypeName")
						%> 
                        " has been added to the database.</p>
                        <p class="textEvent">&nbsp;</p></td>
                        
                      </tr>
Thanks a lot .......