I have a table called RescheduleIns and another called Shop Complete
Table that are opened together on another form called fAll Shop Orders.
On this form, all the Shop Complete Table data is displayed as the
main form and the RescheduleIns data is displayed as a subform. I
would like to open another form called fPurchasing that opens fAll Shop
Orders, but filterd based on records that have subforms. I have the
following code that loads on the fPurchasing form, but it does load
properly and I'm not sure what I'm doing wrong.
Can anyone help?
Private Sub Form_Open(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
Dim frmCurrentForm As Form
stDocOpen = "fAll Shop Orders"
stLinkCriteria = "Forms![fAll Shop Orders]![RescheduleIns]![Top
Level Req]=" & "'" & "[Shop Order #]= '"
DoCmd.Close
DoCmd.OpenForm stDocOpen, , , stLinkCriteria
Set frmCurrentForm = Screen.ActiveForm
frmCurrentForm.Label66.Caption = "PURCHASING ISSUES"
frmCurrentForm.Label66.Width = 3780
frmCurrentForm.Label66.BackStyle = 0
frmCurrentForm.Label66.ForeColor = 0
frmCurrentForm.Caption = "fPurchasing Issues"
End Sub
I haven't created any relationships for the two tables. Should I have
created a relationship between the two?
Thanks,
Ronnie