Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How do you do that?

Author  Topic 

Yves Koks
Starting Member

2 Posts

Posted - 2002-07-05 : 04:50:20
If have this form with let's say, 3 fields.

In Field 1 : You have the choice of a, b, c......z.
In Field 2 : Name
In Field 3 : Country.

But in Field 3, he must give only those countries which
starts with that letter you gave in Field 1.

Is that possible?


RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2002-07-05 : 05:24:23
Yes, just do another select on the change event of field1....

Which language?

Peace

Rick

Go to Top of Page

Yves Koks
Starting Member

2 Posts

Posted - 2002-07-07 : 15:47:03
I am using Codecharge and language is Javascript.

I tried Select * from and so on, but no result yet.
But we'll continue to find it.

The input from field 1 is other table than for Field 3.
Field 1 = letters table
Field 3 = country table

Go to Top of Page

DavidD
Yak Posting Veteran

73 Posts

Posted - 2002-07-08 : 00:21:48
Not sure if I'm understanding the problem fully, but is this what you are after..

Create proc FindCountries @firstletter varchar(1)
as
select * from country
where left(countryname, 1) = @firstletter

The proc can then be called with the first letter passed to it and will return all info on countries starting with that letter.

Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2002-07-08 : 20:04:30
You might also want to do a search for "Dependant drop-down" on some javascript sites.

Michael




<Yoda>Use the Search page you must. Find answer you will.
Go to Top of Page
   

- Advertisement -