Setting values in a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two main forms that each have a subform. Both forms are based on a
one-to-many relationship between the main form (1) and the subform (many).
Based on certain information keyed into subform 2, I need to open
main/subform 1 and want to copy relevant date from subform 2 into subform 1.
I have successfully opened main/subform 1 and retreived the matching record
on the main form 1. When I try to set values on subform 1 through a macro,
the action fails with the message "No current record."
I am totally stumped. Any help would be greatly appreciated. This is my
final routine for my application and I am truly frustrated to have so much
trouble at this point. I am not using code and would like to stay within
ACCESS capabilities to insure I can support this properly, but if there is no
other answer I will try to plug-in some suggested code.
 
You seem to have addressed something I am struggling with. I want to be able
to find a record in another form from a record in a subform. I think I dont
have the expression correct. How did u do it?
 
Dan,
I am using information from subform2 to decide if I need to open
Form/subform1. The field that I am using to open Form/subform1 is present in
both of the main forms. Here is how I got this to work.
Form1 is named [frm_NewProject]. Form2 is named [frm_NewWaste]
I run a macro based on the contents of subform2 (using a conditional
statement in the macro) that will open Form1 and bring up the correct record.

Open Form:
Form Name: frm_NewProject
View: Form
Filter:
 
Dan,
Sorry about the half reply. I hit some key that posted my reply before I
completed it. Here are the parameters I put in the "Open Form" action in the
macro
Form Name: frm_NewProject
View: Form
Filter: blank
Where: [FacilityNumber]=[Forms]!]frm_NewWaste]![FacilityNumber]
DataMode: Edit
WindowMode: Normal

Hope this helps.

GeorgieGirl said:
Dan,
I am using information from subform2 to decide if I need to open
Form/subform1. The field that I am using to open Form/subform1 is present in
both of the main forms. Here is how I got this to work.
Form1 is named [frm_NewProject]. Form2 is named [frm_NewWaste]
I run a macro based on the contents of subform2 (using a conditional
statement in the macro) that will open Form1 and bring up the correct record.

Open Form:
Form Name: frm_NewProject
View: Form
Filter:


Dan said:
You seem to have addressed something I am struggling with. I want to be able
to find a record in another form from a record in a subform. I think I dont
have the expression correct. How did u do it?
 
Back
Top