FrontPage Paramater Passing Issue

timokeeffe
timokeeffe used Ask the Experts™
on
The SQL statement below represents a view I have saved in an Access DB. I am using frontpage DB wizard to pass the parameter '::RepName::' into this view. This is down by a drop down called Repname which submits to the table view page of this view. Any ideas why this parameter cannot be passed? thanks



SELECT DISTINCT [RepDB].[REPNAME], SigLeads02.*
FROM (RepDB INNER JOIN Zip ON [RepDB].[RepNum]=[Zip].[RepNum]) INNER JOIN SigLeads02 ON [Zip].[ZipCode]=[SigLeads02].[HotelZip]
WHERE [RepDB].[REPNAME]= '::RepName::' And [Sigleads02].[FollowUP] Between Date() And DateAdd("w",7,Date());

It fails each time. But if I hard code in a RepName the query displays correct data. I am using frontpage  
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Hi,

I just want to make sure,  is RepName a text or numeric field?

From the name it looks text but I would like to make sure.  If it is numeric remove the ' from the formula.

Your SQL looks fine to me.

What error are you getting?

hhammash

Author

Commented:
text field, I am set it was an error on my part.

Commented:
Here is a tutorial on how to pass parameters from one page to another.

http://www.wardcameron.com/frontpage/DRW/Parameters/index.asp

It takes you on a step-by-step approach to making it easy to work with queries saved in Access and using FrontPage as your development software. It should help.

It probably is that you are not actually passing the parameter correctly. Make sure you have your hyperlink set up to pass the parameter correctly. You should see ?RepName=Smith (assuming Smith is a rep name) at the end of the hyperlink.

wcameron
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Commented:
I'm guessing that the problem is in the name. You called your drop-down Repname rather than RepName. Try changing the name to match the data field name.

Commented:
Hi,

If you did the following:

1- Name the Drop down adn RepName
2- Post the form to the DRW that has the view
3- Save the form

When you press the submit button the value of RepName should be passed to the page. Unless you created the drop down outside a form.

Make sure that you create a form,  then inside the form put the drop down,  then post your form to the view page.  This way it will never fail.

Regards
hhammash

Commented:
Hi timokeeffe,

Have you done it?

As I said,  create the DRW that is based on the query (view).  
Create a form and inside the form create the drop down,  name the drop down as RepName.  Post the form to the page that has the DRW of the view.

Now when you select a value from the drop down and post it to the DRW of the view,  the sql will pick up the data according to the RepName you selected.

1- Insert>Form
2- Insert Dropdown inside the dotted borders of the form.
3- Name the Drop ad RepName
4- Post the form to the DRW that has the SQL
5- Save the form


hhammash

Commented:
Hi,

Any Progress?

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept hhammash answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

coreybryant
EE Cleanup Volunteer

Commented:
Thank you Corey,  
Thank you modulo

I really appreciate it.

hhammash

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial