Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dropdown results based on a DB 1

Status
Not open for further replies.

dburnham

Programmer
Oct 18, 2001
118
US
I am using FP2002.

I have set up an ASP page with a dropdown fields created from a DB table. Once the user selects a record and clicks OK, that variable is then sent to another ASP for more processing.

My issue is that there is more information in the table that I need sent to the second ASP page.

I.E. Currently they can select their company. That fields transfers fine. However, I also need the remaining fields to transfer as well.

I created the one dropdown that I have now using the DRW from an existing connection that I am using through out the site.

David Burnham
 
I thought that I might be able to clarify what I am trying to do.

I have a table with two fields: CoTblCompany, CoTblPassword

I used the DRW to create a dropdown option to choose the Company Name. What I have not been able to do is to populate a field or variable with the corresponding Password.

Any and all help is appreciated.

David Burnham
 
Tiffany,

I was hoping that you would reply. I had already searched your site...which I have done many times.

Your tutorial was great and I was able to incorporate it quickly.

Still another question though. Is it possible to link the database results/detail fields to a text box.

What I have is a user that is constantly adding customer information to a master table. They would like to be able to select the company, via drop down or the picklist that you pointed out, and have the Company Name and Password populate the user input field. They are tring to avoid typos on these two fields. I would love to use a standard drop down but the list of Companies will grow.

I hope that this makes sense and that you are able to help.

You are much appreciated.

David Burnham
 
Are the two fields that you want populated going to be part of a form with other fields that will be enpty, or ready to be filled out? Or just two text input fields?

Either way, it is possible to do this and if your using DRW then I assume that your host does support ASP. I believe that you will have to edit some of the HTML too.. but I also want to make sure I'm clear on what you are doing. After the selection is made with the drop down, and the next page comes up with the form fields auto filled with the correct info - then what? Is this to send the user to a certain page? Or to update a table with more info?

I'd love to take credit for the spiderwebwoman.com/resources site, btw :) But it is a collegue's website and I also reference it often for all things DRW and DIW! I do have a few DRW and DIW tutorials of my own as well, but her site is really great with that focus especially!

Tiffany

Microsoft MVP - FrontPage
 
Thanks again for your response. I will be on-line all day today until I get this working.

The Table that the Drop down is looking at only has two fields.... CoTblCompany and CoTblPassword

The user will select a company and then "submit".

The submit process should send the appropriate variables from CoTblCompany and CoTblPassword to the next ASP form. This form will contain text fields for additional information to be entered manually. The CoTblCompany and CoTblPassword variable need to be populated into their respective text boxes.

Once all of the information has been entered the user will "Submit: this ASP to another ASP.

The third ASP will, unknown to the user, post all of the fields to a master table and send out an e-mail to the e-mail variable received from the second ASP.

I already have the second and the third pages working as long as the values are entered manually. The user has requested the ability to just select the Company from a drop down list ensuring no typos for the Company/Password fields.

I hope that this makes sense.

Thanks again,
David Burnham
 
I believe if you use a request.query on the second page - where the results will show/fill the input boxes for CoTblCompany and CoTblPassword where company=x

On the first page, the drop down menu should send the user to page2.asp?company=x where x equals the ID associated with that company name chosen from the drop down. You could use the ID # for that particular record.


I see that the tutorial that I sent you has changed since it was initially created becuase I believe she initially did that using drop down menu's. Here is a page on her site that lists many tutorials and tips including some DRW drop down menu ones:
This is the one that I should have posted before, sorry:

I think this one will help with what you are trying to do better! It will probably need a few adjustments to get it working exactly how you need it to work in the end, but hopefully this will get you off in the right direction. I will be out most of the rest of the day, but will follow up with you to make sure you have got this straight. I might need to actually site down and work it out step by step myself and post a tutorial for you later if you aren't able to get it working - am just short on time at the moment.

Hope this helps you though!
Tiffany


Microsoft MVP - FrontPage
 
Tiffany,

Thanks, I did do some modifications to the code but I was able to make it work.

Would you believe that you had sent me to the same tutorial several months ago for the same Site that I am working on.

I never thought about using the same process on the back end that I use on the front. To me they were totaly different..

Any way,
Thanks again.

David Burnham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top