J
Jennifer P
I have a Form Called Daily Dispatch Log it contains my officers movements.
We rarely have any dealing with vehilces but on occassions we need to enter
vehicle information. I have created a pop up form called Vehicle. Both
these forms are linked to the same table "Daily Dispatch Log" and show the
same amount of records however when I open the pop up form "Vehicle it starts
at record 1, how can I get it to pop up to the current record that the daily
dispatch log form is displaying? See the code below....
Private Sub Vehicle_Entry_Click()
On Error GoTo Err_Vehicle_Entry_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Vehicle"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Vehicle_Entry_Click:
Exit Sub
Err_Vehicle_Entry_Click:
MsgBox Err.Description
Resume Exit_Vehicle_Entry_Click
End Sub
Private Sub Vehicle_Entry_Enter()
Dim strLinkCriteria As String
strLinkCriteria = "[intDailyID] = " & CStr(Me![intDailyID])
db.OpenForm "frmVehiclePop", , , strLinkCriteria
End Sub
We rarely have any dealing with vehilces but on occassions we need to enter
vehicle information. I have created a pop up form called Vehicle. Both
these forms are linked to the same table "Daily Dispatch Log" and show the
same amount of records however when I open the pop up form "Vehicle it starts
at record 1, how can I get it to pop up to the current record that the daily
dispatch log form is displaying? See the code below....
Private Sub Vehicle_Entry_Click()
On Error GoTo Err_Vehicle_Entry_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Vehicle"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Vehicle_Entry_Click:
Exit Sub
Err_Vehicle_Entry_Click:
MsgBox Err.Description
Resume Exit_Vehicle_Entry_Click
End Sub
Private Sub Vehicle_Entry_Enter()
Dim strLinkCriteria As String
strLinkCriteria = "[intDailyID] = " & CStr(Me![intDailyID])
db.OpenForm "frmVehiclePop", , , strLinkCriteria
End Sub