Populating subform #2 field with subform #1 field

t3nchi

Registered User.
Local time
Today, 04:33
Joined
Sep 28, 2005
Messages
79
I have a mainform. I select from a couple of combo boxes. Based upon these selections, it pulls up appropriate info in subform #1.

There is a field in subform #1 which I want to populate a field in subform #2 with (automatically).

What kind of "event" is this? After/before? I tried everything, nothing works.

Let's try these naming conventions:

Main form = mainform
Subform #1 = subform1
Subform #2 = subform 2
Field Subform #1 = fieldsubform1
Field Subform #2 = fieldsubform2

Help me write the code and help me locate where to put that code. It's been troubling me for a long time.

Thanks, I hope someone can help me out.
 
The first question that comes to mind is..... two fields... two tables... same info????? Why? If this is the case I would look at the design of the database first. Most of the time you wouldn't want to do this....... Of course always exceptions....... For example a type of invoice form... maybe showing a service address and a billing address.... Those are sometimes the same... sometimes different. In that case to save the user from typing the same address in again I use a command button I title "Same" on the OnClick event of that button... subform2.field = subform1.field

But again...... take another look at the DB design...... is the duplicate needed??
 
It's a whole nuther set of data that I need associated with the same info.

For example, I have Company A.

Company A has a set of data (address,phone,name of CEO). It's more exclusive.

So table 1 will look like this:

Company A, (254) 292-2932, George bush
Company B, (232) 207-3939, Dick Cheney

Company A also has another set of data (name of employees, employee data etc)

But they have one thing in common (they're both company A). Except the 2nd table will look like this:

Company A, John Smith, marketing
Company A, Jane Doe, advertising
Company A, Superman, bodyguard
Company B, Jim Bub, maintenance
Company B, Joe Bub, marketing

2 subforms to be filled out simultaneously on the same mainform.
 

Users who are viewing this thread

Back
Top Bottom