| View previous topic :: View next topic |
| Author |
Message |
MSPhobe Super User

Joined: 29 Sep 2005 Posts: 529 Location: England
|
Posted: Thu May 28, 2009 3:17 pm Post subject: Selecting with a form: Desperate plea to experts in 4th post |
|
|
(What I want to do is more involved... this is just the essence of a part of it.)
Suppose a very simple database:
1 Table. PEOPLE, with three fields...
--- ID (Primary Key, auto-incrementing)
--- FirstName
--- LastName
Data in table...
1/ Joe/ Smith
2/ Joe/ Brown
3/ Henry/ Green
4/ Fred/ Bloggs
5/ Fred/ Smith
===
What I want is....
A form, not by macros, with two tables (datasheets) on it.
In the first....
Joe
Henry
Fred
... i.e. the FirstNames present in the data, but each one oniy once.
In the second, if "Joe" is selected in the first....
Joe Smith
Joe Brown
In the second, if "Henry" is selected in the first....
Henry Green
... and so on.
In other words, we choose a first name from the first datasheet, and the second lists all the people with that first name.
Sorry to be so dim.... have tried numerous things.
Last edited by MSPhobe on Sat May 30, 2009 7:55 am; edited 2 times in total |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Fri May 29, 2009 12:31 am Post subject: |
|
|
Hello MSPhobe
Your question is about forms. But I will bring back it to a table and a query. A form is no more then a tool for this displaying a table or a query.
In the your main form you display :Firstname
Select distinct Firstname from table
In your subform you display Firstname Lastname
Is based on the real table
To connect both forms you use in the subform the master and slave fields. In both you fill in Firstname
The main is based on a query. The subform can be base on a real table.
Romke |
|
| Back to top |
|
 |
MSPhobe Super User

Joined: 29 Sep 2005 Posts: 529 Location: England
|
Posted: Fri May 29, 2009 12:42 am Post subject: |
|
|
Thank you for that. I've been going 'round, and 'round, and 'round!!
I KNOW I've done something like this in the past. Now I'm trying to get beyond where I got last time... and am having trouble getting as far as I got last time!!! Probably something simple when you know how :-)
Can't work on it more today :-(
... but I WILL return to it!
The "Use Query" and "Distinct" things are probably part of what I need....
Tom |
|
| Back to top |
|
 |
MSPhobe Super User

Joined: 29 Sep 2005 Posts: 529 Location: England
|
Posted: Sat May 30, 2009 7:53 am Post subject: |
|
|
*** FOURTH POST IN THREAD ****
Welll... many, MANY hours later, I've made SOME progress. Thank you, Romke for helping me forward. There's even a tutorial on the web with some of the first steps towards my ulitmate goal....
http://sheepdogguides.com/fdb/fdb3cascsel1.htm
... which... crudely... does some things, which I hope some readers will find of interest.
BUT!... a second tutorial, with a "proper" solution got just so far, and then I hit a brick wall. It, in an unfinished state, is at....
http://sheepdogguides.com/fdb/fdb3cascsel2.htm
******=========
Please, please, please, Experts: Have a look at that? Get me past the thing which is defeating me??
******=========
Tom
PS.... v
v
OH YESSS!!! Thank you Firefox! My machine went weird half way through the above. I had to do a hard reset, and when I re-booted, Firefox managed to restore my session, even saving the text I'd so far written!! Whew. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|