View Full Version : Searching in Access
Mhtml
01-27-2003, 04:54 AM
How can I create a search in Access?
I need to be able to search by Name, and Id.
Hello again
To do this you create a query.
- Click the query tab.
- Then enter as design view
- Select the table you want to search from the list
- Then close that box
- You now see the table above a load of columns
- Select the name field from the list and drag to the fist cell
- Then below that now in the criteria cell put something like this
[Please enter a name]
- Then run it and it should work
that ok ??
:thumbsup:
P.S If you need to search by name and id so it matches both, then just the do the same for the id field. i,e drag it down from the list and put something in the criteria cell.
P.S - P.S Just one more point. Any additonal fields which you want to show up after you have searched by name and id, just drag the relevant fields to a new cell and leave the criteria cell BLANK.
cool i think thats it for now :D
Mhtml
01-27-2003, 09:55 AM
Once again you've come through for me. :D
Thanks, I am getting the hang of this now.
Curious how you learned all this though.
cool . . glad to help
I studied it at school for about a year and at college for several months of my course and bits and bobs here and there.
If you have any other questions post them here. And when I come on I will see what I can do for you.
chow
:thumbsup:
Mhtml
01-27-2003, 10:28 AM
How would I go about intergrating the results of the query into a form?
Ok this is fairly simple.
This is the quickest way save you building it from scratch
- Click the form tab
- Click on create form using wizard
- When box appears the drop down on the left click it
and select your query
- Then follow the rest of the steps
Bingo . . :D
Mhtml
01-27-2003, 11:19 AM
Ok, that's all done and I'm in the home stretch! :)
This next bit may be a little more complex though.
There is a preformatted word document. I need to be able to get the database stuff to the word document and into that format.
It also needs to pull out other records where the ID is the same as the the secondId in the table.
So it will list the name and id and then the name and id of the other entry where it is equal to secondId in the table.
lol. Hope this isn't to hard for you. It has me stumped.
PS: I can insert data into a word document, just not sure how to insert the relational data in the format I want it.
Hey
I said i studied it, doesn't mean I paid any attention in class !! :D
How are you linking with word at the moment ?? I have never done that before. I just had a quick look in access, I dont have much time so, sorry.
What I have discovered is if you click on the query or table and then go to Tools > Offic Links > Merg it with Ms Word. You can then choose where you want the fields using a little drop down box. You should be able to make your document and drop in the fields where you want.
I am not certain though cos I have never done it.
I am not sure about how to get the extra id and name.
I would have a look for you but I dont have time right now. You might be able to figure it out before I get chance.
hope that helps somewhat
:thumbsup:
Mhtml
01-27-2003, 04:37 PM
lol, thanks anyways. I think I will be able to figure this out. :D
Oh just a thought
Is your data in two tables. i.e in one table do you have id, name and in the another have id2, name ??
If you did you could set-up a relationship between the two tables and recreate your query to pull in data from the second table.
I want explain how just for now but you can do it if you have it set-up that way
:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.