fornext doloop step
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » For/Next Do/Loop - Step Functions

For/Next Do/Loop - Step Functions

resolvedResolved · Low Priority · Version 2003

replyReplyThu 24 Sep 2009, 16:03Delegate Ashley said...

For/Next Do/Loop - Step Functions

Within a for/next loop i know you can 'step' through the loop using the code

For x to y step z
...
next

will step through a count loop only displaying multiples of z (if counting units for instance)

Is it possible to set up a similar step function using a do x/loop routine? I cant get it to accept the 'Step z' at the end of the Do.... line

Many Thanks

For upcoming training course dates see: Pricing & availability

replyReplyFri 25 Sep 2009, 10:29Trainer Stephen said...

RE: For/Next Do/Loop - Step Functions

Hi Ashley

Thanks for your question.

Step values only work with count based loops. Conditional based loops require numeric variables to be increased explicitly.

An example would be as follows


Sub test()

a = 1
b = 10

Do While a < b


a = a + 2

Loop

End Sub

 

 

Please browse our web site to find out more about
access.training and other Microsoft training courses.

Access tip:

Change case

To change case from upper or lower case, highlight the text area, hold down the Shift key and pres F3

View all Access hints and tips

forum postHow to trap errors

» Forum post: VBA Access


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training