F
Fredrated
I am using the following code to move a bound form to a new record:
Property Let CompanyID(id As Long)
Me.RecordsetClone.FindFirst "co_id = " & CStr(id)
If (Me.RecordsetClone.NoMatch) Then
msgbox "Look-up failed at fCompanyAddEdit LET KeyValue # " & CStr(id)
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End Property
If I display this form and a company list side-by-side on the screen, and
click on a company on the company list, and the following code executes:
Form_fCompanyAddEdit.CompanyID = Me.txtCoID
then the company edit form fCompanyAddEdit moves to the requested record and
the company information is displayed in the form.
However, when these forms are each subforms of another form, the company
editing form does not display updated company information when a new company
is clicked on in the company list.
When I step through the code in debug mode, the code "Me.Bookmark =
Me.RecordsetClone.Bookmark" executes, but the new company is not displayed on
the form! A few minutes ago when I added additional code to track values, it
worked and the new company infomation displayed on the form. So I took out
the extra code, and it stopped working again. The I put the extra code back,
but it will not work again!!!
What would stop a record from displaying when Me.Bookmark =
Me.RecordsetClone.Bookmark appears to execute properly?
Thanks.
Property Let CompanyID(id As Long)
Me.RecordsetClone.FindFirst "co_id = " & CStr(id)
If (Me.RecordsetClone.NoMatch) Then
msgbox "Look-up failed at fCompanyAddEdit LET KeyValue # " & CStr(id)
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End Property
If I display this form and a company list side-by-side on the screen, and
click on a company on the company list, and the following code executes:
Form_fCompanyAddEdit.CompanyID = Me.txtCoID
then the company edit form fCompanyAddEdit moves to the requested record and
the company information is displayed in the form.
However, when these forms are each subforms of another form, the company
editing form does not display updated company information when a new company
is clicked on in the company list.
When I step through the code in debug mode, the code "Me.Bookmark =
Me.RecordsetClone.Bookmark" executes, but the new company is not displayed on
the form! A few minutes ago when I added additional code to track values, it
worked and the new company infomation displayed on the form. So I took out
the extra code, and it stopped working again. The I put the extra code back,
but it will not work again!!!
What would stop a record from displaying when Me.Bookmark =
Me.RecordsetClone.Bookmark appears to execute properly?
Thanks.