Graham T
Registered User.
- Local time
- Today, 08:34
- Joined
- Mar 14, 2001
- Messages
- 300
I have a search form (frm Search Author Details) containing a combo box, with a row source of:
SELECT [tblMakeAuthor].[strLastName], [tblMakeAuthor].[strFirstName] FROM [tblMakeAuthor] ORDER BY [tblMakeAuthor].[strLastName];
On the On_Click event of this I have attached a macro: mcrOpenAuthorDetailsForm, which should open up the frmAuthorDetails and show all details for the choice of author from combo.
The Where condition in the macro reads: [Forms]![frmAuthorDetails]![strLastName]=[Forms]![frmSearch Author Details]![cboAuthorsList]
On the form to be open there is the field [strLastName], but the frmAuthorDetails form is opening as a blank form showing no fields. I have tried removing the where condition and the form opens no problems, but obviously not at the correct record.
I believe this is obviously a problem with using the combo box to select values and set the Where condition, but have had no luck in working this out.
I have no problem in making this work with code, but need to show this using a macro and combo box. Is this possible?
Thanks in advance - Graham
SELECT [tblMakeAuthor].[strLastName], [tblMakeAuthor].[strFirstName] FROM [tblMakeAuthor] ORDER BY [tblMakeAuthor].[strLastName];
On the On_Click event of this I have attached a macro: mcrOpenAuthorDetailsForm, which should open up the frmAuthorDetails and show all details for the choice of author from combo.
The Where condition in the macro reads: [Forms]![frmAuthorDetails]![strLastName]=[Forms]![frmSearch Author Details]![cboAuthorsList]
On the form to be open there is the field [strLastName], but the frmAuthorDetails form is opening as a blank form showing no fields. I have tried removing the where condition and the form opens no problems, but obviously not at the correct record.
I believe this is obviously a problem with using the combo box to select values and set the Where condition, but have had no luck in working this out.
I have no problem in making this work with code, but need to show this using a macro and combo box. Is this possible?
Thanks in advance - Graham