PDA

View Full Version : Field Value From One Form to Another Form


ABC123

davej
02-26-2005, 06:24 PM
I have a form (Form A) with various fields, one of which is StudentID. On Form A there is a button to open Form B which contains two fields (StudentID and class). Using Action Scripting, I can open Form B with no problem and set StudentID equal to StudentID on Form A ONLY if there is at least one existing Form B containing the same StudentID as on Form A. If there is no existing Form B with the StudentID equal to Form A, I get an error message stating "No records in query.". When I click OK on the error message, I get another error message stating "

davej
02-26-2005, 06:36 PM
Ooopps, too fast on the finger...

I have a form (Form A) with various fields, one of which is StudentID. On Form A there is a button to open Form B which contains two fields (StudentID and class). Using Action Scripting, I can open Form B and set StudentID equal to StudentID on Form A ONLY if there is at least one existing Form B containing the same StudentID as on Form A. If there is no existing Form B with the StudentID equal to Form A, I get an error message stating "No records in query.". When I click OK on the error message, I get another error message stating "The window ':Frm_Form A' does not exist", so I thought I'd try Xbasic and see if I had any better luck.I can load, show and activate Form B using an OnPush event, but what I'm not smart enough to do is to set the value of 'class' on Form B to the current value of 'class' on Form A. Any help in doing this would be appreciated.

Dave

Tom Cone Jr
02-27-2005, 12:05 AM
Dave,

Perhaps the xbasic examples in the topic "Pass Values Between Forms" in the Code Archive will help?

-- tom

davej
02-27-2005, 11:20 AM
Tom,

Thanks, I think that is going to do what I need.

Dave