Solved

Multiple statements on one line in Access VBA

Posted on 2012-03-16
3
560 Views
Last Modified: 2012-03-16
Hi

I would like to convert the following statements to one line (as in Visual Basic.net).  Can this be done in Microsoft Access VBA?


If IsNull(Me.[Quantity]) Then
    Me.[Quantity].SetFocus
    Exit Sub
End If
0
Comment
Question by:peispud
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 37731973
If IsNull(Me.[Quantity]) Then Me.[Quantity].SetFocus :  Exit Sub

mx
0
 
LVL 75
ID: 37731974
Note the Colon ...
0
 

Author Closing Comment

by:peispud
ID: 37731982
Thanks
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question