By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Filtration problem

P: 72
hi vb wizards, just wanna ask sumthing i have a database created in access, with diffirent primary id, now i want to know how can i able to filter those data from my database, its like i have 30 records consists of different id, the first has the letter "a" on the first character, the second 10 has letter "b" and last 10 has letter "c", the question is how will i able to filter it if i only want to view the database that has the letter "a" on its id and display it on a labels ,, using adodc in visual basic 6. i hope somebody can help on its, my graduation will depend on this project.. please help me...!!! thank you in advance, any help will be a great help for me.....
May 5 '07 #1
Share this Question
Share on Google+
4 Replies


Expert 5K+
P: 8,434
hi vb wizards, just wanna ask sumthing i have a database created in access, with diffirent primary id, now i want to know how can i able to filter those data from my database, its like i have 30 records consists of different id, the first has the letter "a" on the first character, the second 10 has letter "b" and last 10 has letter "c", the question is how will i able to filter it if i only want to view the database that has the letter "a" on its id and display it on a labels ,, using adodc in visual basic 6. i hope somebody can help on its, my graduation will depend on this project.. please help me...!!! thank you in advance, any help will be a great help for me.....
I'm not familiar with the use of filters, but the SQL expression to limit the records in this way would be something along the lines of PrimaryId Like "a*".
May 5 '07 #2

P: 72
thanks you for that, can you give the whole syntax of that query,,, am not very familiar in SQL language, but ithink it will work... thank you for the idea...
May 5 '07 #3

Expert 5K+
P: 8,434
thanks you for that, can you give the whole syntax of that query,,, am not very familiar in SQL language, but ithink it will work... thank you for the idea...
Well, the simplest version would be...

Select * From TableName Where PrimaryID Like "a*"

Note, I'm not sure whether you need to use single or double quotes (' or ").

For more information on SQL, I'd advise you tel check out the Access forum. Especially the" Tutorials and Code Samples" item near the top.
May 5 '07 #4

P: 72
thank you from the advise. i have a code its like this:

if cboSem.text = "1st Sem" and cboCourse.text = "BS.Tourism" then
SELECT * From dbTimeSchedule.mdb WHERE PrimaryID Like "T0101*"

For i = 1 to __________
label1 to 10.caption = ______
"this is the area where all records must be placed".

Next
end if


My problem is i dont know what will i do, i dont know how, its like this i have a total of 14 labels, and the record of the said condition is only ten, so want i wanted to do that i can hide the rest of the labels that is not neccessary needed for a specific records. i hope you can help i badly need some ideas and help.

Thank you hoping for your reply!
May 7 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.