Front Page 2003 Database Editor - adding search/lookup and edit

  • Thread starter Moving rpts from Access to Rptg Services
  • Start date
M

Moving rpts from Access to Rptg Services

I am very new to Front Page: I have created an Access db and imported it to
Front Page. I needed a form that would show the results as well as allow
editing... After many hours of researching I created an interface for each
table and chose created the Submission, Results and Database Editor pages.
The Database Editor will show the results and allow editing on the same page,
but I have been asked to add a Search button to that page that will do a
lookup and display the data for that choice.

Currently, instead of a Search and link, there is a hyperlink on each row to
the details at the bottom of the page. 5 records at a time are displayed and
you have to scroll to get to the next 5 etc.

Is it possible to add a "search and find and populate" to the Database editor?

Thank you!

Karen
 
M

Moving rpts from Access to Rptg Services

Within the Database Editor? I was worried about trying that because this
message is embedded in the design page for the editor:
Comment: -Important- If you modify this Database Results region using the
Database Results Wizard, then your Database Editor will no longer work. If
you accidentally open the Database Results Wizard, simply click Cancel to
exit without regenerating the Database Results region.

Thank you.

Karen
 
M

Moving rpts from Access to Rptg Services

But can a user edit on the results page? It did not seem interactive to me.

Thank you,

Karen
 
K

Kathleen Anderson [MVP - FrontPage]

You can create a new database results query page in the editor folder, keep
the search form, delete the results table, and have it posts the results to
the list.asp page. (in Normal View, right-click on the form, select Form
Properties, Send to other: Custom ISAPI, NSAPI, CGI, or ASP Script. Click on
Options, and set the Action to: list.asp). You need to add the criteria used
in the query page to the SQL in the list page using a WHERE clause; for
example: WHERE (company = '::company::') company is the search field from
the query page.


--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/


"Moving rpts from Access to Rptg Services"
 
M

Moving rpts from Access to Rptg Services

Ok, just tried that:
1. created a databae results page under the editor folder for that
interface. I brought in the 3 fields from that table and set the criteria as
(Location_Code = Location_Code)
2. I saved the results form as search_kiosk.asp
3. I deleted the results_page.asp
4. I had the newly created results page, search_kiosk.asp, point to list.asp
and added WHERE (Location_Code = '::Location_Code::') to the end of the line
fp_sQry="SELECT * FROM PS_Kiosk

Does that sound correct to you? If so, which page do I open to see the
lookup/search? If it is the new search_kiosk page I created, the search box
is there but when I type in the location code and hit search, it returns the
first 5 items in the box no matter what code I type in.

I'm sorry, I just started learning this on my own a week ago and I'm sure I
have goofed up somewhere in this...

Thank you,

Karen
 
K

Kathleen Anderson [MVP - FrontPage]

No, you shouldn't have deleted results_page.asp, you were supposed to delete
the results table from search_kiosk.asp

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/


"Moving rpts from Access to Rptg Services"
 
M

Moving rpts from Access to Rptg Services

Also just noticed the WHERE (Location_Code = '::Location_Code::') ORDER BY
Location_Code ASC"
that I added to List.asp keeps being overwritten
 
M

Moving rpts from Access to Rptg Services

ok. i'll start over tomorrow and try again. Thanks for your time and
patience, Kathleen.

Karen
 
M

Moving rpts from Access to Rptg Services

Just recreated the Kiosk interface. After creating the Database Results
query and saving it as search_kiosk.asp, I looked for a table called results
in the db but could not find one.

After I added WHERE (Location_Code = '::Location_Code::') ORDER BY
Location_Code ASC" to the list.asp file, I receivied an error like "contents
have been modified and on a save the changes will be overwritten"

Any ideas?

Thank you,

Karen
 
K

Kathleen Anderson [MVP - FrontPage]

The table is not called Results, it's just the table where the results of
the query appear.

Always modify the gray-colored code, not the maroon, and save your changes
while you're still in HTML/Code view.

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/


"Moving rpts from Access to Rptg Services"
 
M

Moving rpts from Access to Rptg Services

Gosh, didn't know that. Ok, I deleted the results table in the
Search_kisok.asp form and copied the WHERE (Location_Code =
'::Location_Code::') ORDER BY Location_Code ASC" to the gray-colored code
in the list.asp form after the FROM clause.

The code was accepted. Yea! I'm supposed to use the search_kiosk form to
view and edit the data? If so, when I open the page on the Web, I type in
the location code in the search area and the row for that location does
populate, but I can't figure out how to edit the data and then save to the db.

Thank you so much, Kathleen.

Karen
 
K

Kathleen Anderson [MVP - FrontPage]

If you change the action of the Search_kiosk.asp form to post to list.asp
(see my post below), when you do a search, you will get the results of the
search in list.asp, which is already set up to let you select records to
edit.

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/


"Moving rpts from Access to Rptg Services"
 
M

Moving rpts from Access to Rptg Services

Yes, the action was set to list.asp and the method is post. I must have not
configured something else correctly. After opening the search_kiosk.asp form
on the Web and search for the location code, a results row does pop up.
There is a hyperlink line under the ID column but when I click it nothing
happens.

In the other database editor pages, the results show in a separate window
(table?) below the query and that is where I can hit the Edit button to make
the changes. Should this screen have 2 windows as well.

Thanks, again.

Karen
 
M

Moving rpts from Access to Rptg Services

Hi. this is the line in list.asp where I added the criteria:
fp_sQry="SELECT * FROM PS_Kiosk WHERE (Location_Code = '::Location_Code::')
ORDER BY Location_Code ASC"
Does this look ok?

Karen
 
M

Moving rpts from Access to Rptg Services

Kathleen, I wanted to thank you for your help. I'm not sure why but I had to
leave out the step to remove the results table. When I did that, it worked.
Thank you so much and sorry I was such a pain : )

Karen
 
K

Kathleen Anderson [MVP - FrontPage]

I'm glad you got it to work - and you were not a pain. I'm sure it was a
good learning experience, not just for you but for others reading the
thread.


--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/


"Moving rpts from Access to Rptg Services"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top