![]() |
| DRC Forum
» Personal Interests » Computers » Access problem! » Page 1 of 1 |
|||
![]() ![]() |
|||
| Author | Message | ||
|---|---|---|---|
|
Friday, November 9 2007, 16:14:59 #40603 Access problem! For my school work I have to do some database or other. It's about 5 a day basically. I've got a table with fields like name of fruit, colour group, calories and some other shit. I need to do a form (easy enough, done) then I need to add a text box and button (done) then I need to type something into the text box and press the button and it searches the table for whatever I put into the text box. Not done, that's where you come in. Any ideas |
|||
| Profile | Send PM | AIM | YIM | MSN | ICQ | |||
|
|
|||
| WWW | |||
|
Saturday, November 10 2007, 12:45:08 #40605 "Search" maybe? |
|||
| Profile | Send PM | |||
|
Saturday, November 10 2007, 18:06:03 #40608 I guess you're looking for an appropriate SELECT statement? If I remember right, wildcards are %. If you need something else, be more precise.
|
|||
| Profile | Send PM | |||
|
Sunday, November 11 2007, 09:55:19 #40609 Right well basically I've got a table with hundreds of records that look like this:
Apple | red | 100 | 1 and some other weird shit where the first field is the name of the fruit/veg, the next is the colour group, next is calories, and next is quantity to account for 1 daily portion. Now, I want a form where you could type in in a text box "Apple", press a button, and it "filters" for want of a better word the table to just show fruits with the word apple in it. (In the table there's about 4 different apples, apple juice, red apple, green apple) etc... Another way of phrasing it would be if you went into a video store and the guy has a table full of his movies and you say to the guy on the counter I want a list of videos with Robert De Niro in for example and he types his name in and he gets something like this: The Deer Hunter Taxi Driver Casino Goodfellas etc... except I want the same thing for fruit/veg. |
|||
| Profile | Send PM | AIM | YIM | MSN | ICQ | |||
|
Sunday, November 11 2007, 12:31:25 #40611 you have to tell us what the table columns are named. are you using PHP? Hit me up on Skype if you have the time. :-)
|
|||
| Profile | Send PM | |||
|
Sunday, November 11 2007, 13:06:02 #40612 No PHP is being used. It's not being coded it's all done in access.
|
|||
| Profile | Send PM | AIM | YIM | MSN | ICQ | |||
|
Sunday, November 11 2007, 14:58:52 #40613 aaah. well sorry then, I don't know access. I thought you were making a website :-)
|
|||
| Profile | Send PM | |||
|
Tuesday, November 13 2007, 14:18:40 #40619 I didn't even bother reading the criteria. Doesn't matter don't need to do it. |
|||
| Profile | Send PM | AIM | YIM | MSN | ICQ | |||
|
Tuesday, November 13 2007, 17:43:16 #40620 |
|||
| Profile | Send PM | |||
|
Wednesday, November 14 2007, 01:24:10 #40622 You need an SQL statement and use a value from a search textbox as a variable in it.
sample table:
SELECT `fruit` FROM table_mytable WHERE fruit LIKE %apple%; code example here http://www.thescripts.com/forum/thread188647.html _________________
|
|||
| Profile | Send PM | WWW | AIM | YIM | MSN | SKYPE | ICQ | |||
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum |