Query Lists and Other Functions

  • Thread starter Thread starter deshorta
  • Start date Start date
D

deshorta

Guest
Rather than put these in a couple of threads I thought I'd stick them in the same one. One of them, in particular, is a little bit difficult to explain so bear with me.

1. I have a query which prompts someone to enter in a course name to be searched for. So, obviously, in the criteria I have put [Please enter course name]. Is it possible to write any sort of code that puts in a drop down list that the user selects an option from rather than entering a course name?

The problem is that I have a set list of course names and when someone wants to search for them they have to enter the whole name, spelt immaculately. I would prefer it if they could have it so they can select it from a list to save time and effort.

Anyone know how plausible this is?

2. Another query I have is to search for a surname. This involves [Please enter a surname]. However, if the users only knows part of the name then I would like to be able to search that. I know you can write * and other symbols like that when the query is devoted to just one set criteria, but can you combine the [Please enter a surname] tag with the * and so forth?

I hope they both make sense. And many thanks in advance to those of you who take time out to read this.
 
Last edited:
1. Make a combobox on a form. Put the list you want into it. In the query, simply reference the combobox like this: [Forms]![MyForm]![MyCombo] and replace MyForm and MyCombo with the appropriate names.

2. Like "*" & [Please enter a surname] & "*"
 
Mile-O-Phile said:
1. Make a combobox on a form. Put the list you want into it. In the query, simply reference the combobox like this: [Forms]![MyForm]![MyCombo] and replace MyForm and MyCombo with the appropriate names.

2. Like "*" & [Please enter a surname] & "*"

Thank you very much! Just a quick follow on to point 1. The problem is that the way the forms work is that a combobox isn't plausible because of the design. Is there any other way? I'm guessing it's quite an unrealistic proposition :-)
 
For question 1. Where in the query do you reference the combo box. I have tried that, but it just asks me to enter the parameter. I am obviously doing something wrong, I just can't figure out what. Thanks in advance.
 
Ditto,

i have this same issue and cannot figure out where in the query do i enter the reference.

i put it under the criteria section but instead of showing the list all it does is ask me for the value

any help would be greatly appreciated

Ricky
 

Users who are viewing this thread

Back
Top Bottom