E
EdwardA
Trying to manually construct a query within my search form
to look up shipments in 2 different tables within a period
of calendar days. When the query runs, both forms pop up
white, and I get the "Object Required" error.
Heres my code.
Private Sub Command3_Enter()
On Error GoTo Err_Command3_Enter
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "STOCK_WHSE27"
ssDocName = "STOCK_OUT"
srDocName = "TECH_RMA_Log"
ssLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm ssDocName, , , ssLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
stLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
DoCmd.RunCommand acCmdTileHorizontally
Exit_Command3_Enter:
Exit Sub
Err_Command3_Enter:
MsgBox Err.Description
Resume Exit_Command3_Enter
End Sub
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "STOCK_WHSE27"
ssDocName = "STOCK_OUT"
srDocName = "TECH_RMA_Log"
ssLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm ssDocName, , , ssLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
stLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
DoCmd.RunCommand acCmdTileHorizontally
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
to look up shipments in 2 different tables within a period
of calendar days. When the query runs, both forms pop up
white, and I get the "Object Required" error.
Heres my code.
Private Sub Command3_Enter()
On Error GoTo Err_Command3_Enter
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "STOCK_WHSE27"
ssDocName = "STOCK_OUT"
srDocName = "TECH_RMA_Log"
ssLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm ssDocName, , , ssLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
stLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
DoCmd.RunCommand acCmdTileHorizontally
Exit_Command3_Enter:
Exit Sub
Err_Command3_Enter:
MsgBox Err.Description
Resume Exit_Command3_Enter
End Sub
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "STOCK_WHSE27"
ssDocName = "STOCK_OUT"
srDocName = "TECH_RMA_Log"
ssLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm ssDocName, , , ssLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
stLinkCriteria = "[Date Recieved]=" & "'" & Me![Text1]
& "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria,
(((STOCK_WHSE27.[Date Recieved]) >= [Text1] And
(STOCK_WHSE27.[Date Recieved]) <= [Text2]))
DoCmd.RunCommand acCmdTileHorizontally
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub