This is how I ended up doing it.
But now there are other issues (will make a new thread).
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack Then Exit Sub
'this label text fixing won't work until the html labels are changed to asp:label's
'Dim allControls As System.Collections.Generic.List(Of Control) = Talisman.Core.Web.WebUtils.ChildControls(Me.frmEdit, GetType(Label))
Dim qFilter As New PredicateExpression
qFilter.AddWithAnd(MetricFields.MetricCode = Request.QueryString("MetricCode"))
Me.Filter = qFilter
Me.frmEdit.DataBind()
If Me.frmEdit.DataItemCount = 0 OrElse Me.llbDataSource.EntityCollection(0).IsNew Then
'If Me.frmEdit.DataItemCount = 0 Then
If Request.QueryString(frmEdit.DataKeyNames(0)) <> "" Then Throw New System.Exception(String.Format("Record not found for {0} = {1}", frmEdit.DataKeyNames(0), Request.QueryString(frmEdit.DataKeyNames(0))))
Me.frmEdit.ChangeMode(FormViewMode.Insert)
ElseIf frmEdit.DataItemCount = 1 Then
Me.frmEdit.ChangeMode(FormViewMode.Edit)
End If
End Sub