dsullinger
MIS
If I have a table with 4 fields; FieldA, FieldB, FieldC, FieldD.
I have one form with FieldA and FieldB, then a button that opens another form with FieldC and FieldD.
When I push the button for the second form, the data for FieldC and FieldD from the table are not being passed to the form.
I am using the following to open the second form:
Private Sub cmbSuper_Click()
On Error GoTo Err_cmbSuper_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Part2-Super"
stLinkCriteria = "[FieldA]=" & "'" & Me![FieldA] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmbSuper_Click:
Exit Sub
Err_cmbSuper_Click:
MsgBox Err.Description
Resume Exit_cmbSuper_Click
End Sub
Any ideas why this isn't working?
Thanks
I have one form with FieldA and FieldB, then a button that opens another form with FieldC and FieldD.
When I push the button for the second form, the data for FieldC and FieldD from the table are not being passed to the form.
I am using the following to open the second form:
Private Sub cmbSuper_Click()
On Error GoTo Err_cmbSuper_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Part2-Super"
stLinkCriteria = "[FieldA]=" & "'" & Me![FieldA] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmbSuper_Click:
Exit Sub
Err_cmbSuper_Click:
MsgBox Err.Description
Resume Exit_cmbSuper_Click
End Sub
Any ideas why this isn't working?
Thanks