Sorry, I'm struggling with syntax... here is my code:
I must clarify that my main form is a simulated dataview (i.e. form
view with continuous rows of records. What I want to do is double-click
on the asset number field which will (and does) open another form that
displays more asset details for that item. My form opens but I don't
understand how to 1) get the respective record displayed in the second
form and 2) when I double-click another line (record) on my first form
it will refresh the second form with the respective details of that
record. Let me know of any more or better details I can provide...
Thanks!!
_______________________________________________
Private Sub Asset_Number_DblClick(Cancel As Integer)
On Error GoTo Err_Asset_Number_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Asset Details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Asset_Number_Click:
Exit Sub
Err_Asset_Number_Click:
MsgBox Err.Description
Resume Exit_Asset_Number_ClickEnd Sub
_____________________________________________
Look at the OpenForm arguments
Docmd.OpenForm "ProdFormSingle",,,"Prodnum = " & Me.ProdNum
salad wrote:
Parasyke wrote:
I have what is probably a simple fix for the gurus. I have one form
that has several products listed and I want to double-click onto the
field to bring up a more detailed product form of the chosen product. I
have "ProdNum" as a field on both forms. How can I link the forms?
Thanks in advance!!
Dav
Look at the OpenForm arguments
Docmd.OpenForm "ProdFormSingle",,,"Prodnum = " & Me.ProdNum