Hi All,
I have a table to track visit of sellers. I open a form to create new record. I wish to close this form and open another one based on a query that shows all records related to visits of this seller.
Could any member help me on this code?
Private Sub BtnSeeVisits_Click()
On Error GoTo Err_BtnSeeVisits_Click
Dim stLinkCriteria As String 'I do not know if here is variable???
'After update the form I want to refresh and hide it and open another form
that is based in a query
Forms![FrmVisitSeller].Refresh
Forms![FrmVisitSeller].visible = False
'Click BtnSeeVisits to see visits of said seller. I have several sellers. If I put show all records form shows records of all sellers. I need to see visit of the last updated seller...
DoCmd.OpenForm "FrmVisitSellerAllRecords"
stLinkCriteria = "[SellerID]=" & Me![SellerID]
Exit_BtnSeeVisits_Click:
Exit Sub
Err_BtnBtnSeeVisits_Click:
MsgBox Err.Description
Resume Exit_BtnSeeVisits_Click
End Sub
Tks a lot...
I have a table to track visit of sellers. I open a form to create new record. I wish to close this form and open another one based on a query that shows all records related to visits of this seller.
Could any member help me on this code?
Private Sub BtnSeeVisits_Click()
On Error GoTo Err_BtnSeeVisits_Click
Dim stLinkCriteria As String 'I do not know if here is variable???
'After update the form I want to refresh and hide it and open another form
that is based in a query
Forms![FrmVisitSeller].Refresh
Forms![FrmVisitSeller].visible = False
'Click BtnSeeVisits to see visits of said seller. I have several sellers. If I put show all records form shows records of all sellers. I need to see visit of the last updated seller...
DoCmd.OpenForm "FrmVisitSellerAllRecords"
stLinkCriteria = "[SellerID]=" & Me![SellerID]
Exit_BtnSeeVisits_Click:
Exit Sub
Err_BtnBtnSeeVisits_Click:
MsgBox Err.Description
Resume Exit_BtnSeeVisits_Click
End Sub
Tks a lot...