Yes you can edit fields in front page it is a bit drown out but possible. Here goes the explaination You will need 3 pages to complete this. A page to select the rewcord to edit, a page to do the editting, and a page to submit the edit on.
First you have to select the record you want to edit. I am going to use the lastName field in the employees table of the Northwind Database.
Connect and display the LastName field in a table in the usual manner.
Second you have to make a Hyperlink to the edit form on another page and you have to pass along the parameter of the Name you are editting and of the unique identifyer for the record you want to edit.
Do this by right clicking on the <<LastName>> field in the Frontpage generated table. Next select HYPERLINK
in the address section type in the name of your edit page....Mine is LastNameEdit.asp
now you have to pass the parameters. Click the PARAMETERS button on the bottom of the Hyperlink Window. Now CLick ADD
In the NAME window select the column Last Name this should fill in the Value field with <%=FP_FieldURL(fp_rs,"LastName"%>
Click OK then Click ADD Again
In the NAME window select the Primary Key column EmployeeID this should fill in the Value field with <%=FP_FieldURL(fp_rs,"EmployeeID"%>
now click OK and OK and OK....this is the edit selection page.
Now open a new page and this will be the edit page. On this page Create a form By selecting INSERT ->FORM-> ONE LINE TEXT BOX
This will set a form on your page with a text box that we will do the editing in.
Double Click the Text box and
In the name area enter "LastName",
in the initial Value area type in <%=request("LastName"%> the "<%" Tells frontpage you are writing in VB and the "=" means "Write". next the request("LastName" means whatever data was passed to this page with the parameter of LastName and Finally the "%>" Means that you are done typing in VB.
Now we need to set the form up to go to the Final page.
Right Click on the form and Click FORM PROPERTIES. Check the Radio Button For "Send to other" next hit the OPTIONS button.
In the actions area type the Name of your edit submit page...mine is LastNameEditSubmit.asp
Click OK
We need to also pass that employeeID Parameter From the Last Page we will do that with a Hidden Input field
Click ADVANCED
In the ADVANCED FORM PROPERTIES box click ADD
In the name Filed type in the name of your Parameter....employeeID and in the value box type in
<%=request("employeeID"%> See above for an explaination of this code.
Now Click OK till you are out of these windows...
Finally the last page....
this page has to be made by altering a bit of the SQL Query in the insert Database Results Wizard. it is not too bad though.
First INSERT->DATABASE RESULTS to open the wizard and Connect to the NORTHWIND Database in Page One then hit NEXT
In Page 2 of 5 Click the radio button for "Custom Query"
in the Custom Query window there may be something like select* from........erase that and type in
update employees
set LastName='::LastName::'
where employeeID='::employeeID'
(the ':: and ::' tell frontpage these are parameters and that they are text.....if you have nemeric data leave off the tick marks)
now click verify query and hope for a "bing" along with a succesful message. if it gliched you prolly have a typo.
OK out of these back to page 2 of 5 and hit NEXT
on Page 3 of 5 hit MORE OPTIONS
in the Message to display taxt field type in "Data Changed"
Hit o.k. and go to Page 4 of 5
On Page 4 of 5 Uncheck all of the Check Boxes and leave the drop down on TABLE- one record per row
Click Next to get to page 5 of 5
on page 5 of 5 Click the radio button for "Display all records together"
and turn off the "Add search Form" button.
Click FINISH ...save all your pages and hope like hell
launch the first page select a name to edit.....make changes and submit thwem to the 3rd page
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.