Open to current record in a pop up form

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
 
S

sparker

If nobody has answered this for you, I would be happy to take a look at it.
Can you zip up the forms and table and send them to me? - SPARKER
 
J

Jennifer P

Sparker I have a spam email if you could send me the information on where to
send it to (e-mail address removed) and then I will give you my Police
Department email directly.....thanks Jen

sparker said:
If nobody has answered this for you, I would be happy to take a look at it.
Can you zip up the forms and table and send them to me? - SPARKER

Jennifer P said:
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
 
S

sparker

Jen,
the spamfree@ and the @spamfree are surrounding the actual address.
-SPARKER

Jennifer P said:
Sparker I have a spam email if you could send me the information on where to
send it to (e-mail address removed) and then I will give you my Police
Department email directly.....thanks Jen

sparker said:
If nobody has answered this for you, I would be happy to take a look at it.
Can you zip up the forms and table and send them to me? - SPARKER

Jennifer P said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top