Hello,
I hope someone can help me with this problem. I have a form that has contains a subform. The user may add a record to the subform. The code for adding the record to the subform is...
Set ws = DBEngine.Workspaces(0)
Set db = DBEngine.Workspaces(0).Databases(0)
ws.BeginTrans
Set rs = db.OpenRecordset("tblClientSupport")
rs.AddNew
rs!ODBIDClient = Me!ODBID
rs!ODBIDSupport = Me!cboNewSupportPerson
rs!clspSupportType = Me!cboSupportType
rs.Update
ws.CommitTrans
Me![frmSubSupport].Requery
rs.Close
ws.Close
db.Close
This all works fine, however if the user trys to view another client via a command find button and drop down list
code is...
**** Me.RecordsetClone.FindFirst "[ODBID] = " & Me!cboSelect
Me.Bookmark = Me.RecordsetClone.Bookmark
Me!CmdFind.SetFocus
Me!lblSelect.Visible = False
Me!cboSelect.Visible = False
Me!cboSelect.Value = ""
The code with the *** is throwing the error. The ODBID is
the primary key for tblClients.
Hopefully someone can make some sense of this post.
Thanks
Mike
I hope someone can help me with this problem. I have a form that has contains a subform. The user may add a record to the subform. The code for adding the record to the subform is...
Set ws = DBEngine.Workspaces(0)
Set db = DBEngine.Workspaces(0).Databases(0)
ws.BeginTrans
Set rs = db.OpenRecordset("tblClientSupport")
rs.AddNew
rs!ODBIDClient = Me!ODBID
rs!ODBIDSupport = Me!cboNewSupportPerson
rs!clspSupportType = Me!cboSupportType
rs.Update
ws.CommitTrans
Me![frmSubSupport].Requery
rs.Close
ws.Close
db.Close
This all works fine, however if the user trys to view another client via a command find button and drop down list
code is...
**** Me.RecordsetClone.FindFirst "[ODBID] = " & Me!cboSelect
Me.Bookmark = Me.RecordsetClone.Bookmark
Me!CmdFind.SetFocus
Me!lblSelect.Visible = False
Me!cboSelect.Visible = False
Me!cboSelect.Value = ""
The code with the *** is throwing the error. The ODBID is
the primary key for tblClients.
Hopefully someone can make some sense of this post.
Thanks
Mike