Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form opening from datasheet, 1st time fine, 2nd time sub-form isblank.

Status
Not open for further replies.

maxxev

Technical User
Jul 17, 2008
139
NL
Hi, I have a datasheet with this code
Code:
Private Sub RM_Code_DblClick(Cancel As Integer)
On Error GoTo Err_Command34_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmIngredients"
    
    stLinkCriteria = "[Ing_codeID]=" & Me![Ing_codeID]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command34_Click:
    Exit Sub

Err_Command34_Click:
    MsgBox Err.Description
    Resume Exit_Command34_Click
End Sub

The first time the double click opens the "frmIngredients" form and it's sub-form with no issues.
2nd time (and onwards) the sub-form only is blank.
If I edit the form and come out it complains that it cannot "lock" the form as it is already open (which i'm guessing is relelvent).

Any thoughts please.

Cheers
 
Nobody have any ideas about this at all?

Anyways I can do it differently then?

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top