By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,678 Members | 2,155 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,678 IT Pros & Developers. It's quick & easy.

Query criteria based on ASP form selections

P: 8
I have medium experience with Access but need help trying to create a query for the following scenario... any and all help will be greatly appreciated!

A user will select different items on an .asp form ... depending on what they select (i.e. individual, 14 day, worldwide, 40 metre) I need to bring up a policy price.

Please ... any help with construction of this would be greatly appreciated!\
May 11 '07 #1
Share this Question
Share on Google+
5 Replies


maxamis4
Expert 100+
P: 295
It seems like you need desperate help, but what your asking is a bit diffcult to explain to a novice.

What you need is two tables.

First table needs to have the name of the policies followed by a number that is unique to each policy (aka autonumber)

then create a second table with policy information. In this table make sure you have the number that corresponds to that policy. The reason why i say have a different table for the policyinfomration is due to the fact that sometimes a policy might have multiple packages. With this method you could list all the packages without jumbling them up together.

once this is done set a querystring based on the value of the combo box witch will be linked based on the unique id and will submit the query to return the results based on the selection.

http://www.asp101.com

good luck
I have medium experience with Access but need help trying to create a query for the following scenario... any and all help will be greatly appreciated!

A user will select different items on an .asp form ... depending on what they select (i.e. individual, 14 day, worldwide, 40 metre) I need to bring up a policy price.

Please ... any help with construction of this would be greatly appreciated!\
May 11 '07 #2

P: 8
I understand the need to have 2 tables and to have them linked through the primary key, that has been done. What I am unsure of is how to write the query based on options chosen on the form.

It seems like you need desperate help, but what your asking is a bit diffcult to explain to a novice.

What you need is two tables.

First table needs to have the name of the policies followed by a number that is unique to each policy (aka autonumber)

then create a second table with policy information. In this table make sure you have the number that corresponds to that policy. The reason why i say have a different table for the policyinfomration is due to the fact that sometimes a policy might have multiple packages. With this method you could list all the packages without jumbling them up together.

once this is done set a querystring based on the value of the combo box witch will be linked based on the unique id and will submit the query to return the results based on the selection.

http://www.asp101.com

good luck
May 11 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
I understand the need to have 2 tables and to have them linked through the primary key, that has been done. What I am unsure of is how to write the query based on options chosen on the form.
If the query was using criteria from an Access form you would use something like ...

Expand|Select|Wrap|Line Numbers
  1. WHERE [FieldName]=[Forms]![FormName]![TextboxName]
However, I don't know how this would translate using an ASP form. Try asking the question in the ASP forum. They are more likely to be familiar with the syntax.
May 12 '07 #4

maxamis4
Expert 100+
P: 295
Did you look at http://www.asp101.com?

That has all the examples you will need. take a look then let me know if you are still having problems.
QUOTE=mmccarthy]If the query was using criteria from an Access form you would use something like ...

Expand|Select|Wrap|Line Numbers
  1. WHERE [FieldName]=[Forms]![FormName]![TextboxName]
However, I don't know how this would translate using an ASP form. Try asking the question in the ASP forum. They are more likely to be familiar with the syntax.[/quote]
May 14 '07 #5

maxamis4
Expert 100+
P: 295
Expand|Select|Wrap|Line Numbers
  1. WHERE [FieldName]='" & TextboxName] & "'"
that would be the asp way, now if you use a session string it would be session(name) instead of text box
May 14 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.