J
Jim
If have the code below in the OnLoad event which is working fine for the most
part. The second line is causing a problem for cases where there is no
matching record. The code is setting the value - I'd like to have it check
the value first, and if it matches the value for the related field in the
current form recordset, set the value, otherwise just open the form without
setting the value.
If CurrentProject.AllForms("AllOpen").IsLoaded Then
Me.Combo1 = Forms!AllOpen!ID
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![Combo1], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Thanks!
Jim
part. The second line is causing a problem for cases where there is no
matching record. The code is setting the value - I'd like to have it check
the value first, and if it matches the value for the related field in the
current form recordset, set the value, otherwise just open the form without
setting the value.
If CurrentProject.AllForms("AllOpen").IsLoaded Then
Me.Combo1 = Forms!AllOpen!ID
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![Combo1], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Thanks!
Jim