Search with Form

W

williamr

I created a form named [frmSearch], it has a combo box named [combo0], and a
button named [cmdSearchButton]. I have a query named qryeverything. the
query has a field named developername. The combo box is a dropdown list of
the developer's names. I select one of the names and press the button. The
button opens a macro that opens [qryeverything]. Here is where I get lost.
I expect that because in [qryeverything] I have the following in the field
developername [forms]![frmSearch]![combo0] that I will get a list of
everything being done by that developer. What I get is a msgbox asking me to
enter some information. Can someone help me, or better yet, tell where I can
read how to do this. I search but get a lot of information that I don't
need. Is what I'm trying to do easy and I just don't see it or is this
something that takes time? Another thing, When I used the wizard to create
the combo box I got 2 options, 'combo box to look up the values' and 'I will
type in the values' My thinking was that I wanted the box to do something
with that value, a third option, Is that part of the problem?

Thanks in Advance
Access Illiterate William
 
R

Rob Oldfield

First thing: you shouldn't be opening queries on screen to allow users to
see/edit data. That's what forms are for. Try building a form based on
your qryeverything and change the code in the click event of the button to

docmd.openform "YourNewFormName"

I expect you'll get the same error as before, but we'll figure that out
next.
 
O

open a adobe file from a command button

Rob, Hi. OK, I made a form named frmSearch, I have a text box and a list box
on the form because when I filter the developer I want their name in the text
box and all of their projects to be listed. I made [bill]!developername is
the controlsource for the text box and the listbox has all the info
associated with the project.

Rob Oldfield said:
First thing: you shouldn't be opening queries on screen to allow users to
see/edit data. That's what forms are for. Try building a form based on
your qryeverything and change the code in the click event of the button to

docmd.openform "YourNewFormName"

I expect you'll get the same error as before, but we'll figure that out
next.


williamr said:
I created a form named [frmSearch], it has a combo box named [combo0], and a
button named [cmdSearchButton]. I have a query named qryeverything. the
query has a field named developername. The combo box is a dropdown list of
the developer's names. I select one of the names and press the button. The
button opens a macro that opens [qryeverything]. Here is where I get lost.
I expect that because in [qryeverything] I have the following in the field
developername [forms]![frmSearch]![combo0] that I will get a list of
everything being done by that developer. What I get is a msgbox asking me to
enter some information. Can someone help me, or better yet, tell where I can
read how to do this. I search but get a lot of information that I don't
need. Is what I'm trying to do easy and I just don't see it or is this
something that takes time? Another thing, When I used the wizard to create
the combo box I got 2 options, 'combo box to look up the values' and 'I will
type in the values' My thinking was that I wanted the box to do something
with that value, a third option, Is that part of the problem?

Thanks in Advance
Access Illiterate William
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top