Update Form from another form fails after combo box lookup
Posted on 2005-03-03
I have a field on a form that when clicked on causes another form to pop up. You then select a record from the popup
form and it populates two fields on the main form with the following code.
Private Sub Form_Click()
Forms!prospects![StoreStatusdesc] = Me.Description
Forms!prospects![Storestatus] = Me.status
DoCmd.Close acForm, "Prospect Store Status2", acSaveNo
This works fine for the first record but when I use combo box on the main form to lookup another record and try to
pick from the popup form I get the following message. Method 'value' of object'_textbox' failed. The code I use
to lookup a record from the combobox is as follows:
Private Sub storelookup_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.Find "[Plus Provider # (NABP #)] = '" & Me![storelookup] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
I can use the navigation buttons to go from record to record and everything works fine. Does anyone have any
idea how to fix this problem.
also I am using an access data project with sqlserver 2000 as a backend.