Form opening with filters
Hi All
I am trying to open Form B from click event of Allocate button which is on Form A.
but somehow its not opening
Code in Form A
Private Sub Allocate_Click()
Dim q As New ADODB.Command, criteria As String, r As New ADODB.Recordset
If sf(23) Then Exit Sub
DoCmd.Hourglass True
Application.RunCommand acCmdSaveRecord
criteria = "[MID]=" & Me!MID
DoCmd.OpenForm "Stock Allocation Grid", , , criteria
DoCmd.Hourglass False
End Sub
Form Properties of B
Record Source:[Table_Name]
Record Source Qualifier:[dbo]
Filter:[Empty]
Order By:[Item]
Private Sub Form_Open(Cancel As Integer)
Me.OrderBy = "Item"
Me.OrderByOn = True
End Sub
any suggestion or advice
|