   This is such a Noob ? that im shamed to ask but...
  Well 1st, /wave hey all.  Im new to the world of game programming (well programming altogether) I have studied VB a bit in college but havent touched on it since (incase you are wondering, that was like 2 years ago).  Anyhow, here is my question;I am currently writing a program to assist me in my job.  Yea i know what your gunna say "this isnt a game." Well i had to put off the game tutorial that i was working on (from the book "Game Programming For Teens" by Jonathan S. Harbour) to get this program done.  I am writing a program that will enter data to a database using a GUI made in vb. I am trying to take data from a list and send it to the database.  The problem that I am having is this, i am trying to search through a list of 5 possible items using a IF ELSEIF statement. The IF statment i have worked out and seems sound to me but I need to find a character that will look for "ANY" data that is in the list.  Something similar to the "*" when doing a file search in windows.  So the code would look something like this:If lst1.List(4) = "*" ThenWith rstRecordset    .AddNew    .Fields(4) = lst1.List(4)    .Fields(3) = lst1.List(3)    .Fields(2) = lst1.List(2)    .Fields(1) = lst1.List(1)End With    Else   If lst1.List(3) = "*" Then    With rstRecordset    .AddNew    .Fields(3) = lst1.List(3)    .Fields(2) = lst1.List(2)    .Fields(1) = lst1.List(1)    End WithIts kind of a backwards filter (its the only way I could think to do it).  Any help or advise would be greatly apriciated and pplz 4give the Noobness :-)Thanks!!!   
  Why not like this (Pseudo code):dim i as integeri = 1do  .Fields(i) = list(i)  i = i + 1until .Fields(i-1) = "*"Cheers;  Assuming that lst1.List(x) returnes a string and that you don't care what it is (your * wildcard), then you could do:if lst1.List(4).Length > 0 then' stuffelse if lst1.List(3).Length > 0 thenelse ' and so on...[EDIT]Or combine it with ernow's suggestion:dim i as integeri = 1do.Fields(i) = list(i)i = i + 1until .Fields(i-1).Length = 0   ;  TY!!!! I was able to get it working with a variation of both your suggestions.  It had not accured to me to try a loop.  Thanks again!! :-)   ;  You are really going to like me. I do not know what your data is going to look like or what you are going to be serching for but what if you have a expression like "J*n*" on data that is January, February, March, ...,  December.You would want to return January and June but not July.To make matters even worse. Lets say that you have a mask of "M*issippi" and you are looking for "Mississippi" with that mask. you will see the * and then it starts looking for what is after it and it matches the "issi" but then the masks "pp" does not match with the second set of "ss" in "Mississippi" so the entire string would not match. In this case you would have to keep track of the next letter after the "*" in the mask incase it occurs later in the string so you can successfully make the "*" being "iss" for that word instead of the empty string.   