Combo Box Search Form function

TheGeneral

New member
Local time
Today, 00:55
Joined
Aug 26, 2011
Messages
8
Hi All!

Just posted this to the macros page but think that the forms page is a bit more appropriate.

I am trying to add a search function to my Database. there are a lot of post regarding this but there are seemingly so many ways to do this and i havent been able to resolve my issue from any of those posts so far.

basically i have added a combo box [TxtSearch] to the main page of my DB [FrmDashboard] this contains a drop down with my candidate names in and their relevant candidate ID's. Basically i want the users to find the name they are searchin for in the drop down selection and when they click the button next to it they will be taken to the relevant record in the form.

I have used macro builder to create the actions required from the button added and the code seems to work but wont take the value from the combo box. details below.

Combo box [TxtSearch] mounted to [FrmDashboard]

Macro Event Properties assigned to button -
Close
OpenForm - Where Condition - [Forms]![FrmDashboard]![TxtSearch]=[CandidateName]

This is to open [FrmWorkbook] to the relevant candidates record based on [CandidateName]

when a selection is made in the combo box and the button is pressed a modal "enter Parameter Value - Forms!FrmDashboard!TxtSearch" appears. when i type in the value in that box it does work.

i have tried changing my where clause to the following;

[Forms]![FrmDashboard]![TxtSearch]=[Forms]![FrmWorkbook]![CandidateName]

but to no avail. Would be extremely greatful if anyone has any suggestions or soloutions to my problem. I appreciate that this is probably a rookie mistake that has been made with probably only a small amendment needed but greatful all the same!

Thanks in anticipation!
 
Thanks for you help Alansidman, i watched your video which will be useful going forward however this was not the solution to my problem.

I have just moved the close function of my macro and now this works fine! I tried everything but that over the past few days and considering how little was needed to fix it im surprised it took so long to chance across the solution like i did!

Thanks again for your help though!
 

Users who are viewing this thread

Back
Top Bottom