BrotherBook
Registered User.
- Local time
- Today, 17:30
- Joined
- Jan 22, 2013
- Messages
- 43
Hi-
I have a listbox containing a large number of potential prospects. When a user double clicks on one, I am trying to pass information contained in the list box to the new entry of a form that launches on the double click. What is weird is that the first field populates in the new form, but the subsequent fields do not. The only difference is the first field is shown in the listbox and the other fields are not shown. Below is the code I am using.
The Company_Name field populates with the correct information, but the remaining fields are not populating. Any ideas?
Mike
I have a listbox containing a large number of potential prospects. When a user double clicks on one, I am trying to pass information contained in the list box to the new entry of a form that launches on the double click. What is weird is that the first field populates in the new form, but the subsequent fields do not. The only difference is the first field is shown in the listbox and the other fields are not shown. Below is the code I am using.
Code:
Private Sub SearchResults_DblClick(Cancel As Integer)
DoCmd.OpenForm "Prospect/Client Entry"
DoCmd.GoToRecord acDataForm, "Prospect/Client Entry", acNewRec
[Forms]![Prospect/Client Entry]![Company_Name] = [Forms]![Menu]![SearchResults].Column(1)
[Forms]![Prospect/Client Entry]![Contact_Name] = [Forms]![Menu]![SearchResults].Column(4) & " " & [Forms]![Menu]![SearchResults].Column(5)
[Forms]![Prospect/Client Entry]![Contact_Title] = [Forms]![Menu]![SearchResults].Column(6)
[Forms]![Prospect/Client Entry]![Contact_Phone] = [Forms]![Menu]![SearchResults].Column(7)
[Forms]![Prospect/Client Entry]![NAICS] = [Forms]![Menu]![SearchResults].Column(8)
End Sub
The Company_Name field populates with the correct information, but the remaining fields are not populating. Any ideas?
Mike