Hello, Can anybody help as below: 1. User fill in E1234 at the first time 2. When second time fill in same item number E1234, it's will auto add revise number and become E1234-Revise 1 3 If third time fill in the same item number E1234, it will increment the revise number 3 and become E1234-Revise 3 It's will auto increment the revise number if the user still fill in the same item number. The revise number is the purpose to detect same item number fill in by the user Thanks
Depending on how many items your planning to store it may be better to seperate the item number and its revision number. IE Store your item number in one column (The E1234 part) and the revision number (as a numeric column) in another. The reason for doing this is it becomes more efficient later to search for it, you can search for all item E1234's without doing a like search which would make indexing more efficient. Also you get around the problem with using a string as the item number and sorting IE E1234-Revision-1 E1234-Revision-6 E1234-Revision-10 E1234-Revision-30 When you sort it and bring it back you get E1234-Revision-1 E1234-Revision-10 E1234-Revision-30 E1234-Revision-6 Which may not be what you want. Jen
Hi, Please refer file "Newrequest" and file "Result" which i attached. Please paste in frontpage and you may see my interface. Let's me explain the file Newrequest: 1. User may select New Request or Revised item 2. User will select Revise Item if fill in same item number that alrdy have in database File "Result: The function that i want to do is auto count how many same item number have key in file "Result". If same item number it will auto count revise-1 and coutinue add revised number-2 if still other user fill in same item number .Can anybody help me? Please help me to write the syntax coding as well as i am new to ASP. Thanks Hope to hear from anybody soon as i am very keen to learn it. Thanks
First page i. Customer fill up the "PART" textbox ii.Customer must select Revised item drop down list Customer choose revised item because the part already exist in database <td bgcolor="#f4f4f4" height="26"><b><font size="2" face="Arial"> Part Number</font></b></td> <td bgcolor="#f4f4f4" height="26"><font face="Arial"><b>:</b> <input name="part" type="text" size="20" id="part" onchange="upperCase(this.id)" maxlength="10"> <td width="92" bgcolor="#f4f4f4"><b><font size="2" face="Arial"> Type</font></b></td> <td bgcolor="#f4f4f4"><!--<font face="Arial"><input name="type" size=25 value="New_Request"></font><b><font size="2" color="#0033CC" face="Arial"> </font></b></td>--> <b><font face="Arial" size="2">:</font> <!--<font face="Arial" size="2" color="#0000FF" onmouseover=this.style.color='red' onmouseout=this.style.color='#0000FF'> New Item</font></b>--> <!--<input name="typedia" type="text" readonly id="typedia" value="New Item" onmouseover=this.style.color='red' onmouseout=this.style.color='#0000FF' style="font-weight: bold; color:#0000FF">--> <select name="typedia" style="text-align: center; width:165" size="1"> <option value="">Please select type</option> <option value="Revised Item">Revised Request</option> <option value="New Item" selected>New Request</option> <font face="Arial"> </select></b><b><font color=red>Ù</font> </TD> Second page post in database access: dim part, tarikh, msg, greenlight part = request.form("part") typedia = request.form("typedia") Dim hits Dim DB Dim strSOL Dim RS SET DB=Server.CreateObject("ADODB.Connection") DB.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbooks.mdb") Set RS=Server.CreateObject("ADODB.Recordset") part= replace(part," ","") strSQL = "Select * from books WHERE part IN ('" & part & "') AND status NOT IN ('Cancel') AND publisher NOT IN ('New Item');" 'response.write strSQL RS.CursorType = 2 RS.LockType = 3 RS.Open strSQL, DB DO while NOT RS.EOF msg = msg & " " & part & " already exist in database " 'goto a RS.MoveNext Loop IF part== then msg = " Revised added " END IF if typedia = "" then if msg <> "" then msg = msg &" and REQUEST TYPE" else msg = " Please Select REQUEST TYPE" end if end if Note: The new one replace the existing one with simply a higher revision number Can anyone show me the way to loop revised iten if meet same part? For example: User 1 Fill in: Part: E1234 Type: Revised item-1 User 2 also fill in same part then revised item increment 1 For example: Part: E1234 Type: Revised item-2 Hope to hear from u soon.. Thanks
As per my reply to your private message, to do what you want you need to add a new field into the table with the type number When the form is posted back in your UPDATE command simply have fieldname = (fieldname + 1) Whilst I know you asked for me to write it all for you it really is for you to do if you are learning ASP (plus I am personally not a programmer) and without knowing the db and form structure it wouldnt be possible to write it for you. If you want one of our programmers to do it then we can quote for you.