473,326 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Query criteria based on ASP form selections

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
5 2120
maxamis4
295 Expert 100+
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
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
14,534 Expert Mod 8TB
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
295 Expert 100+
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
295 Expert 100+
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

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

Similar topics

3
by: Steve | last post by:
Form FrmRestock's recordsource is QryFrmRestock. The TransactionDate field's criteria is set ats: Forms!FrmRestock!LastXDays. LastXDays on the form is a combobox where the selections are 30, 60...
0
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list...
0
by: MLH | last post by:
I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the selections made in a number of criteria choices on a form, a field on the form will have string...
3
by: MLH | last post by:
Am repeating question with different subject heading, perhaps stating more clearly my problem... I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the...
8
by: Steve Jorgensen | last post by:
Mailing List management is a good example of a case where my conundrum arises. Say there is a m-m relationship between parties and groups - anyone can be a member of any combintation of groups. ...
12
by: Tom | last post by:
Hello, I have a database of employee data in access and I am trying to create a form with combo boxes for criteria (ex. gender, office, position, etc.) that let the user select criteria from...
18
by: WU10 | last post by:
Built a form based on a select query with a combo box (3 choices) in the form header which will supply a value to the query. In the query's criteria I added the following expression - !! and...
0
by: mmueller | last post by:
I am new to reporting services 2005 (reporting in Access for years and older versions of Reporting Services from time to time) and this is probably a dumb question... but I have no internal resources...
7
IGGI
by: IGGI | last post by:
Looks like this is the best place for the right Answers. Got a database that stores users skills, "Leader", "Investigator","Engineering" ect in a "personnel" table, A form called "Search Query"...
5
by: RacerX2000 | last post by:
I have an MS access Database (2000) and Have created a form that sets a variable to a value I would like (Based on other selections in the form) to pass to my query criteria and I get the following...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.