Connect one form to another

J

james

MMMMM

BruceM said:
Somebody else may have a better grasp of what you are describing because
they recognize the situation behind your description, but I suspect others
will find the description unclear, as I do.

I know this is a "procedure database", but that says little to those of us
unfamiliar with the actual situation (which is most people reading this).
If you do not receive replies from people who understand what you are
describing you would do well to provide some more details about the
real-world situation behind the database, and a description of the tables
and relationships. Also, a description of the forms and subforms (if any)
based on those tables.
 
J

james

?

BruceM said:
I'm getting that some or all procedures have risks that you want to
display. I gather that Paid Out Loans is a procedure with associated
risks. Do other procedures have some of those same risks? These
questions have to do with whether you need one or two other tables.

In what field is the "23" of "Procedure 23"?
 
S

stockwell43

Hello,

I have a procedure database I am working on. I have all my information on
the form with each procedure linked to the SOP field. Everything works fine
at this point and all reports look correct. However, each procedure may or
may not has Risks Controls associated with them. I can create another table
and a form for just the Risk Control numbers and a description of the Risk.
What I want to find out how to do is this:

On the Risks form I want to enter the SOP# and then the associated Risks
number if any and the description. On the main form, I want to place a
command button so if someone is view the Paid Out Loans procedure
information, they can click the button to pull up the Risks control form and
view the associated risks and description but I want it the risk form to
follow the procedure form. So no matter which procedure is being viewed, if
the pull up the risk form the correct risk will show.

Sorry to be so wordy, just want to make sure I'm clear in what I am asking
for.

Thanks!!!
 
B

BruceM

Somebody else may have a better grasp of what you are describing because
they recognize the situation behind your description, but I suspect others
will find the description unclear, as I do.

I know this is a "procedure database", but that says little to those of us
unfamiliar with the actual situation (which is most people reading this).
If you do not receive replies from people who understand what you are
describing you would do well to provide some more details about the
real-world situation behind the database, and a description of the tables
and relationships. Also, a description of the forms and subforms (if any)
based on those tables.
 
S

stockwell43

Ok, I think this is what you were asking for:

Tables:
tblprocedureinfo - Main table
ProcedureID - AutoNumber
EffDate - Date
RevDate - Date
ProcNumber - Hyperlink
ProcName - Text
Comments - Memo
Completed - Text
UserLogin - Text

tblproceduresub - Sub table
ProcedureID - Number
Department - Text
CollDS - Date

These two tables are related by the ProcedureID field

Forms:
frmprocedureinfo - Main Form
frmproceduresub - Sub Form

Linked by ProcedureID field

I want to create another table and another form for the Risk information. I
just want to place a button on the main form so when clicked, if the user is
viewing Procedure#23 when the risk form pops up it will show the risks
associated with Procedure#23.

Hope this helps.

Thanks!!
 
B

BruceM

I'm getting that some or all procedures have risks that you want to display.
I gather that Paid Out Loans is a procedure with associated risks. Do other
procedures have some of those same risks? These questions have to do with
whether you need one or two other tables.

In what field is the "23" of "Procedure 23"?
 
S

stockwell43

I'm getting that some or all procedures have risks that you want to display?:
Yes

I gather that Paid Out Loans is a procedure with associated risks. Do other
procedures have some of those same risks?:
Yes, some procedure may have the same risk associated with them.

In what field is the "23" of "Procedure 23"?:
In the ProcNumber field
 
H

hor vannara

stockwell43 said:
Hello,

I have a procedure database I am working on. I have all my information on
the form with each procedure linked to the SOP field. Everything works
fine
at this point and all reports look correct. However, each procedure may or
may not has Risks Controls associated with them. I can create another
table
and a form for just the Risk Control numbers and a description of the
Risk.
What I want to find out how to do is this:

On the Risks form I want to enter the SOP# and then the associated Risks
number if any and the description. On the main form, I want to place a
command button so if someone is view the Paid Out Loans procedure
information, they can click the button to pull up the Risks control form
and
view the associated risks and description but I want it the risk form to
follow the procedure form. So no matter which procedure is being viewed,
if
the pull up the risk form the correct risk will show.

Sorry to be so wordy, just want to make sure I'm clear in what I am asking
for.

Thanks!!!
 
H

hor vannara

stockwell43 said:
Hello,

I have a procedure database I am working on. I have all my information on
the form with each procedure linked to the SOP field. Everything works
fine
at this point and all reports look correct. However, each procedure may or
may not has Risks Controls associated with them. I can create another
table
and a form for just the Risk Control numbers and a description of the
Risk.
What I want to find out how to do is this:

On the Risks form I want to enter the SOP# and then the associated Risks
number if any and the description. On the main form, I want to place a
command button so if someone is view the Paid Out Loans procedure
information, they can click the button to pull up the Risks control form
and
view the associated risks and description but I want it the risk form to
follow the procedure form. So no matter which procedure is being viewed,
if
the pull up the risk form the correct risk will show.

Sorry to be so wordy, just want to make sure I'm clear in what I am asking
for.

Thanks!!!
 
J

John W. Vinson

Ok, I think this is what you were asking for:

Tables:
tblprocedureinfo - Main table
ProcedureID - AutoNumber
EffDate - Date
RevDate - Date
ProcNumber - Hyperlink
ProcName - Text
Comments - Memo
Completed - Text
UserLogin - Text

tblproceduresub - Sub table
ProcedureID - Number
Department - Text
CollDS - Date

These two tables are related by the ProcedureID field

Forms:
frmprocedureinfo - Main Form
frmproceduresub - Sub Form

Linked by ProcedureID field

I want to create another table and another form for the Risk information. I
just want to place a button on the main form so when clicked, if the user is
viewing Procedure#23 when the risk form pops up it will show the risks
associated with Procedure#23.

If each Procedure can have many Risks, and each Risk can apply to many
Procedures, you need *two* tables:

Risks
RiskID <Primary Key>
Risk <text>
<other information about the risk as a thing in itself>

ProcedureRisks
ProcedureID <Long Integer, link to tblProcedureInfo>
RiskID <Long Integer, link to Risks>
<any information about THIS risk as it applies to THIS procedure>

You would use a Subform based on ProcedureRisks on the Procedure form to
assign zero, one or many risks to a procedure.
 
B

BruceM

I refer you to John's response. Note that in the scenario he outlined there
is still a Procedure table. The main form is based on this table, as
described, with a subform based on ProcedureRisks. A separate form based on
the Risks table is used to create a list of risks. The Risks table is the
basis for the Row Source of a combo box on the subform bound to RiskID from
the junction table.
 
Top