I am new to Access, and am trying to go from a datasheet that is based on a query to a form that is based on a table. I want it to pull up the specific line I am double clicking on in the datasheet. PLEASE HELP
Here is the code I am using:
Private Sub Form_DblClick(Cancel As Integer)
On Error GoTo Err_RFQ_Datasheet_Click
If IsNull(Me![OIMOS Key]) Then
MsgBox "Enter OIMOS Key before viewing DataSheet."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm "Estimating", , , Me.OIMOS_Key.Value = Me.OIMOS_Key
End If
Exit_RFQ_Datasheet_Click:
Exit Sub
Err_RFQ_Datasheet_Click:
MsgBox Err.Description
Resume Exit_RFQ_Datasheet_Click
End Sub
This code takes me back to the "Estimating" form, But not to the specific record
Here is the code I am using:
Private Sub Form_DblClick(Cancel As Integer)
On Error GoTo Err_RFQ_Datasheet_Click
If IsNull(Me![OIMOS Key]) Then
MsgBox "Enter OIMOS Key before viewing DataSheet."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm "Estimating", , , Me.OIMOS_Key.Value = Me.OIMOS_Key
End If
Exit_RFQ_Datasheet_Click:
Exit Sub
Err_RFQ_Datasheet_Click:
MsgBox Err.Description
Resume Exit_RFQ_Datasheet_Click
End Sub
This code takes me back to the "Estimating" form, But not to the specific record