dbTalk Databases Forums  

How do I populate two tables with one form?

comp.database.ms-access comp.database.ms-access


Discuss How do I populate two tables with one form? in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan CFC
 
Posts: n/a

Default How do I populate two tables with one form? - 12-31-2003 , 11:35 AM






Hello,

I'm trying to add fields to a form, but have exceeded the maximum
number of fields allotted for a table (250 fields). So I though I
would take the same form and add combo boxes with the same dropdown
criteria that would populate a new table. I can create the table,
create the combo box with the dropdown criteria in the form, but it
wont let me select anything and populate the new table.

Does anyone have any suggestions as to how I can get around this?

Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: How do I populate two tables with one form? - 01-01-2004 , 10:20 AM






There are 2 approaches that I can see.

Create a main form with 2 subforms.
The fields that are in common to Tables A & B are on the main form and
the fields that are only in tables A and B are on their individual
subforms.
A very tiny amount of code would be needed to be sure that everything
gets saved or updated at the same time, but it is only a few lines.

The alternative is to do it with code.
Create a form with the fields for table A bound. Create unbounded
fields (no record source) for table B. When the record for A is
saved, use the after insert event of the form (or after update if
editing) to add or update the fields in table B.
Code for this is simple but tedious.

Unless there is a strong reason not to, I would suggest the first
apporach.

There are other methods but I don't see that any of them is any better
than these two.

Good Luck
Ira Solomon


On 31 Dec 2003 09:35:17 -0800, Daniel_G_Cantone (AT) Fleet (DOT) com (Dan CFC)
wrote:

Quote:
Hello,

I'm trying to add fields to a form, but have exceeded the maximum
number of fields allotted for a table (250 fields). So I though I
would take the same form and add combo boxes with the same dropdown
criteria that would populate a new table. I can create the table,
create the combo box with the dropdown criteria in the form, but it
wont let me select anything and populate the new table.

Does anyone have any suggestions as to how I can get around this?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.