I have changed opening a new form when a button is pressed from:
DoCmd.OpenForm "Workform", _
WhereCondition:="WorkteamID=" & Me.[txtWorkteamID]
to calling this function written by Allen Browne, that enables multiple forms to open:
Function OpenAClient()
'Purpose: Open an independent instance of form frmClient.
Dim frm As Form
'Open a new instance, show it, and set a caption.
Set frm = New Form_frmClient
frm.Visible = True
frm.Caption = frm.Hwnd & ", opened " & Now()
'Append it to our collection.
clnClient.Add Item:=frm, Key:=CStr(frm.Hwnd)
Set frm = Nothing
End Function
How can I add the where condition in my old code to the new function?
Nath