OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Selecting with a form: Desperate plea to experts in 4th post

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
MSPhobe
Super User
Super User


Joined: 29 Sep 2005
Posts: 529
Location: England

PostPosted: Thu May 28, 2009 3:17 pm    Post subject: Selecting with a form: Desperate plea to experts in 4th post Reply with quote

(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
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Fri May 29, 2009 12:31 am    Post subject: Reply with quote

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
View user's profile Send private message
MSPhobe
Super User
Super User


Joined: 29 Sep 2005
Posts: 529
Location: England

PostPosted: Fri May 29, 2009 12:42 am    Post subject: Reply with quote

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
View user's profile Send private message
MSPhobe
Super User
Super User


Joined: 29 Sep 2005
Posts: 529
Location: England

PostPosted: Sat May 30, 2009 7:53 am    Post subject: Reply with quote

*** 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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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