473,320 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

For Statments

32
Im havin troubles with a for statement

here is how i have done it

dim len as string = fd.text.length - 1
dim i as integer = 0

for i = len to 0
if fd.text.chars(i) = "\" then
msgbox("\ found")
end if
next

this comes up with no errors but doesent work
Mar 21 '08 #1
2 866
mafaisal
142 100+
Hello
Try This

Expand|Select|Wrap|Line Numbers
  1. dim len as integer 
  2. len= fd.text.length - 1
  3. dim i as integer
  4. for i = len to 0 step -1
  5. if fd.text.chars(i) = "\" then
  6. msgbox("\ found")
  7. end if
  8. next
  9.  
Notes In your code len declare as string changes to integer
also changes in for loop

Faisal
Mar 21 '08 #2
BarryM
32
thanks works like a charm
Mar 22 '08 #3

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

Similar topics

0
by: dregier | last post by:
attached is my full query that I am currently working on: Declare @counterday1 int Declare @counterday2 int set @counterday1 = '20' set @counterday2 = '629' Declare @CounterMin07_01 float...
5
by: Angelina | last post by:
Hi, I need some help in writing a 'if-then-else' statement. I currently have wrote one that looks something like this.. If Combobox1 = xxx and textbox1 <> "" then 'run stored procedure 1 to...
5
by: Andy | last post by:
Hi, How can a statment be explainted as expression and declaration at the same time? Then how shall we resolve this ambiguity? Thanks a lot! andy
4
by: Jesper | last post by:
Hi, I would like to issue three statements to the database (mysql v4.1) each time the server starts up. Is there any built in way to do this? Like a init file to put them in? At the moment I...
3
by: Vinny Vinn | last post by:
I have used simple batch statments with C#.for example: string select = "select model from cars where id = ?;select * from trucks where model = ?"; where ? is a parameter whose value i have...
5
by: orencs | last post by:
Hello, I am using Microsoft.Practices.EnterpriseLibrary.Data. I am running the following sqlCommand = "SELECT var1 FROM table1 WHERE var2 IN (4,5,6) ; SELECT var3 FROM table2 WHERE var2 IN...
3
by: Wes McCaslin | last post by:
I have this application which I'm connected to a access database.I was wondering how could i get the information form a textbox on a form to the fields in the database. So far this is what i have...
1
by: Syl | last post by:
Hello! Can someone verify this for me please. Should these 2 statments return the same result ? The 2nd one is the original, the first one is my re-write. Thanks : SELECT orders_status,...
2
by: lee | last post by:
Newbie question: I'm looking for the easiest way to run SQL statments in Access. I'm getting confused by th GUIs - I'm just looking forhow to run SQL on a table- thanks
2
by: ramdil | last post by:
Hi All Please help me .Hope i have described my problem clearly below. I have a condition where i need to update some data in table from the value taken from another table.So basically i need to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.