Fitness.com
Advertisement
Go Back   Sports Forum > Community > The Pub

The Pub

Grab a beer, sit back and relax.


» Current Poll
Best 5 club teams in history of Football:
Liverpool 1977-1978 - 100.00%
1 Vote
Real Madrid 1956-1960 - 0%
0 Votes
Juventus 1985 - 0%
0 Votes
Milan 1989-1990 - 100.00%
1 Vote
Ajax 1971-1973 - 0%
0 Votes
Santos 1962-1963 - 0%
0 Votes
Torinho 1940's - 100.00%
1 Vote
Ajax 1995 - 0%
0 Votes
Flamengo 1981 - 100.00%
1 Vote
Benfica 1961-1962 - 100.00%
1 Vote
Total Votes: 1
You may not vote on this poll.
» Stats
Members: 103,045
Threads: 85,013
Posts: 1,031,287
Top Poster: Karky (9,532)
Welcome to our newest member, ValeryGah
If you register for free, you will be able to post threads, vote on polls and lots more. If you have problems with the registration or logging in, please contact the administrator.

Reply
 
LinkBack Thread Tools Display Modes
Old 11-06-2007, 10:13 PM   Very simple Visual Basic problem. Post #1
Second Set
 
Join Date: Sep 2007
Posts: 329
Rep Power: 17
aeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura about
Default Very simple Visual Basic problem.

Okay, I really didn't want to start a thread for this here but I can't find the answer anywhere on the internet (and I know some smart a*se will find it on google in minutes but I couldn't) and I know a few people on here are knowledgable.

Right, for my A-level Computing course I've got to do a project for one of my modules, and one particular part of this project that I've chosen is finding a name on a list and adding it to the team for a selected event. So on that form, when it loads, I have loaded in the people names into a list box from a .csv file, and I then have 3 boxes; one for first name, one for surname, and one for yeargroup. What I want it to do is as you type in any of the 3 boxes, it filters out those names in the list box that don't contain that entry, such as typing "Ry" in the first name box will only show those with "Ry" in their first name.

The way I've tried is to use a "Found" flag but that doesn't work at all so hopefully someone can point me in the right direction. And I would ask my teacher but we've gotta do it as independently from them as possible, so doing our own research.

Hope it's clear what I'm after and someone can help :thup: cheers.
aeonteal is offline   Reply With Quote
Old 11-06-2007, 10:15 PM   Very simple Visual Basic problem. Post #2
Second Set
 
Join Date: Sep 2007
Posts: 329
Rep Power: 17
aeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura about
Default

At least I think it's very simple and it's VB6 btw.
aeonteal is offline   Reply With Quote
Old 11-06-2007, 10:18 PM   Very simple Visual Basic problem. Post #3
Registered User
 
Join Date: Feb 2007
Posts: 0
Rep Power: 0
retired_Frappin' is an unknown quantity at this point
Default

I'm guessing you'd have to do a find for each letter going, not quite sure how you'd do it as I'm pretty pathetic on it.

But unless there is a command which does exactly what you say I reckon the best option would be to do a loop (maybe) of finds in that text box.
retired_Frappin' is offline   Reply With Quote
Old 11-06-2007, 10:19 PM   Very simple Visual Basic problem. Post #4
Newb
 
Join Date: Oct 2007
Posts: 0
Rep Power: 0
retired_laticia3 is an unknown quantity at this point
Default

Just a guess Jonno, but have you tried going:

Insert > Formulae > Search

And tried setting it up so you can search for the text?
I am unfamiliar with this particular function due to the fact the ones I need are IF, COUNTIF, FIND, REPLACE and SUM.
retired_laticia3 is offline   Reply With Quote
Old 11-06-2007, 10:20 PM   Very simple Visual Basic problem. Post #5
Second Set
 
Join Date: Sep 2007
Posts: 329
Rep Power: 17
aeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura about
Default

<pre class="ip-ubbcode-code-pre">Private Sub FirstNameTxtBox1_Change()Open "Names.csv" For Input As #1Input #1, PupilFirstName1, PupilSurname1, PupilYear1, Junk, Junk, Junk, Junk, JunkDoInput #1, PupilFirstName1, PupilSurname1, PupilYear1, Junk, Junk, Junk, Junk, JunkFound = TrueFor Counter = 0 To PupilList1.ListCount - 1If PupilFirstName1 = "FirstNameTextBox1" Then Found = FalseNextIf Found = False Then PupilList1.AddItem Left(PupilYear1 + " ", 3) + Left(PupilSurname1 + " ", 21) + Left(PupilFirstName1 + " ", 14)Loop Until EOF(1)Close #1End Sub</pre>

The way I've tried already, probably sounds a stupid way of doing it tbh, but I've just started with this, having never done VB before.

Please work code *fingers crossed*
aeonteal is offline   Reply With Quote
Old 11-06-2007, 10:24 PM   Very simple Visual Basic problem. Post #6
Registered User
 
Join Date: Feb 2007
Posts: 0
Rep Power: 0
retired_Pinkie83 is an unknown quantity at this point
Default

This is the second year of your course, right? Strange you haven't met VB yet, I remember doing it in AS ICT and that isn't based on the programming side of computers either.
retired_Pinkie83 is offline   Reply With Quote
Old 11-06-2007, 10:25 PM   Very simple Visual Basic problem. Post #7
Second Set
 
Join Date: Sep 2007
Posts: 329
Rep Power: 17
aeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura about
Default

Yeah it's A2 now. We did a bit of it last year I guess but it was really really simple problems like making a calculator that adds, subtracts, multiplies and divides. By saying I've never done VB before, I meant I had never met something like this.
aeonteal is offline   Reply With Quote
Old 11-06-2007, 10:29 PM   Very simple Visual Basic problem. Post #8
Newb
 
Join Date: Sep 2007
Posts: 0
Rep Power: 0
retired_gulkis is an unknown quantity at this point
Default

unless i'm misunderstanding the change event or the problem itself, you'll make life easier for yourself by just loading the csv file once and storing it in memory. at the moment aren't you reloading everything every time you change the text box?

i don't really understand your problem though, why do you need three different combo boxes?

vb6 seems like such a strange language to teach new learners.
retired_gulkis is offline   Reply With Quote
Old 11-06-2007, 10:37 PM   Very simple Visual Basic problem. Post #9
Registered User
 
Join Date: Feb 2007
Posts: 0
Rep Power: 0
retired_Frappin' is an unknown quantity at this point
Default

We've got to do a petrol pump program for our AS Level, really not liking any of the computer course at the minute.

Downloaded a vb6 compatible Rodents Revenge game and that seems to see me through the boredom of our teacher.

Reckon I'm going to drop it for A2.
retired_Frappin' is offline   Reply With Quote
Old 11-06-2007, 10:38 PM   Very simple Visual Basic problem. Post #10
Second Set
 
Join Date: Sep 2007
Posts: 329
Rep Power: 17
aeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura aboutaeonteal has a spectacular aura about
Default

Well reloading it every time is the only way I know and its not 3 different combo boxes, I got a list box to show the list of names, and then 3 text boxes to enter what first name, surname or year group you want to show.
aeonteal is offline   Reply With Quote
Reply

Go Back   Sports Forum > Community > The Pub

Bookmarks

Thread Tools
Display Modes


Similar threads to Very simple Visual Basic problem.
Thread Thread Starter Forum Replies Last Post
Back to basic - a collective view of basic tips
Back to basic - a collective view of basic tips: MATCH HINTS AND TIPS Feel free to add...
bRAzIL Tactics & Training Tips 4 09-11-2007 09:08 AM
The basic problem
The basic problem: In real life if you are a manager you know what...
DS Tactics & Training Tips 2 06-24-2007 12:24 PM
Basic and Simple please
Basic and Simple please: Hi, apologises if this post is posted in wrong...
ryanadam Tactics & Training Tips 6 06-23-2007 03:13 AM
Simple Problem
Simple Problem: Hii have a problem it seems really, really simple...
aajsmh1 General Photoshop Board 5 06-29-2006 10:19 PM
Newbie looking for basic simple guidance
Newbie looking for basic simple guidance: I am photoshop illiterate...just so you know...
tisatashar General Photoshop Board 5 03-04-2005 10:40 PM

More threads of Jonno-Blood
Thread Date Forum Replies Last Post
Winamp Problem
Winamp Problem: Afternoon. My Media Library on Winamp has...
09-17-2007 The Pub 2 09-17-2007 05:39 PM
stadium building
stadium building: You personally cannot do much to effect the...
06-05-2006 Football Manager 3 06-16-2006 08:47 PM
Captain, Kick Takers and Playmakers (Containing Idea for FMH07)
Captain, Kick Takers and Playmakers (Containing Idea for FMH07): I've just been playing the game a bit (not had...
06-09-2006 Football Manager 0 06-09-2006 09:15 PM
my own music on the game!!
my own music on the game!!: If you had a quick search around you'd find the...
06-05-2006 Football Manager 0 06-05-2006 10:50 AM
Need HELPPP
Need HELPPP: You'll probably find you're losing out big time...
04-22-2006 Football Manager 0 04-22-2006 12:13 AM

Other threads in forum The Pub
Thread Date Thread Starter Replies Last Post
Best place to get good quality CD-R's
Best place to get good quality CD-R's: I need some new blank CD's, was looking at UKDVDR...
12-02-2007 Walrus 5 12-02-2007 01:49 PM
Premiership Coach - A game for Aussie Rules fans out there
Premiership Coach - A game for Aussie Rules fans out there: Premiership Coach I thought at least a few...
11-22-2007 waspy01 3 11-23-2007 11:11 AM
Andover
Andover: Hi all, In a couple of weeks I start a new...
09-11-2007 Chris Bagnall 31 09-14-2007 11:24 PM
How cool is it when you go for an interview and they offer you the job on the spot?
How cool is it when you go for an interview and they offer you the job on the spot?: Quality imo
09-05-2007 Gimp_Basket_Smiles 53 09-07-2007 02:24 AM
Typing in Foreign Languages
Typing in Foreign Languages: I want to type in Japanese and Korean, and have...
08-27-2005 Madeline 1 08-28-2005 08:15 PM

» Online Users: 17
0 members and 17 guests
No Members online
Most users ever online was 2,128, 07-21-2008 at 08:27 PM.

All times are GMT +1. The time now is 08:45 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Fitness.com | Weight Loss | Training & Fitness | BodyBuilding | Chinese | Spanish | French | Germany | Italian | Friend Codes |
You are viewing Very simple Visual Basic problem..