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

Forms relating to two database tables on one page

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


Joined: 29 Mar 2004
Posts: 2
Location: Southampton, UK

PostPosted: Mon Mar 29, 2004 9:05 am    Post subject: Forms relating to two database tables on one page Reply with quote

Forgive me if this is simple or has been answered elsewhere ... I haven't found an answer yet.

I do locum work - ie working at various places at different times and dates.

I am constructing a database with one table listing all firms I work for and their contact details. I have another listing firm, dates, times and fee. These are saved as dbase files.

I am trying to create a form that will allow me to look up contact details, or enter a new set of detials, with a table on the same page listing all work done for that firm. I can set up a form to look at either table, but not been able to access both tables in one form.

I used the auto pilot to create a simple form for the contact details, then added a table to show the work details, but cannot get it to look at a different file to access the work details.

I would welcome any advice or pointers
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Mon Mar 29, 2004 12:18 pm    Post subject: Reply with quote

Quote:
I can set up a form to look at either table, but not been able to access both tables in one form.

I think this is really at limitation with the dbase file driver, and the ultimate solution is to use a database that does support a more complete use of SQL. Basically you cannot use a query that accesses 2 or more tables.
There may be a workaround for simple requirements though.
See whether these options work for you.

1. You can create the two forms separately (using autopilot or by hand). Then, in design mode select and copy all the elements of one form and paste them to the other. This will give you two Forms on the one page. The Forms Navigator may help you with
The forms will operate independently. You can use macros to provide the linkage between the two forms. You can rename one or both forms from the default name of 'Standard' to make your referencing easier.

2. Create form/subform. This may not work with dbase because of the need to support parameters in the SQL call for the subform. Develop your Form and SubForm separately and merge them onto a single page as in 1 above. Use the Forms Navigator to demote your subform from the top level (select sub-form name in the navigator list and drag into the top level form). Follow the 'how to' for setting up subforms using the linkage parameters.

If you are goig to extend your use of database files, I suggest that you use a 'real database' ...mySQL, Postgres etc.
Back to top
View user's profile Send private message
irw
Newbie
Newbie


Joined: 29 Mar 2004
Posts: 2
Location: Southampton, UK

PostPosted: Thu Apr 01, 2004 12:11 pm    Post subject: Reply with quote

Thanks, your first suggestion did the trick. I had thought that was what I had tried, but obviously not. I deleted the forms I had created, then started again.

I now have a form on the left with firm practice details, then a table on the right listing all work by date, firm, hours & rate.

My next trick is to try to relate the two or learn to create macros to be able to list all work relating to one company in the table, or according to a date range, eg. per month, each option by clicking on a button. I may be back to ask more questions!

Thanks for your help so far.

Ian
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