Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Two Possible Values From Two Forms To One Form

Status
Not open for further replies.

larrydavid

Programmer
Joined
Jul 22, 2010
Messages
174
Location
US
Hello,

I have two forms which need to pass a value to a field on another form that open AfterUpdate():

Dim stDocName As String
Dim stLinkCriteria As String

If [refund reason] = "MCR" Then
Me.ComboChkReturnSource.RowSource = "tbl_Test_Source"
'Pass and populate the TESTVALUE in the Manual Request form.
'The opened form will grab the TESTVALUE value from this calling form.
stDocName = "frm_MCR_Input"
If IsNull(Me.TESTVALUE) = False Then
DoCmd.OpenForm stDocName, acNormal, , , acFormEdit, acWindowNormal
Else
MsgBox ("Please enter a valid TESTVALUE to proceed to Manual Check entry")
End If
Else
Me.ComboChkReturnSource.RowSource = "tbl_Test_Source_2"
End If

In the form that receives these values, I have this statement in the OnLoad():

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
Me.TESTVALUE.Value = [Form_frm_TEST_123].TESTVALUE Or _
Me.TESTVALUE.Value = [Form_frm_TEST_XYZ].TESTVALUE
End Sub

When I use the above method the application just hangs on "Calculating..."

I read an a couple of posts on using OpenArgs, but from what I read it was an error prone approach. If someone could show me a better way to handle this I would greatly appreciate it.

Thanks,
Larry
 
Never mind folks, I figured it out. Thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top