Solved

Multiple statements on one line in Access VBA

Posted on 2012-03-16
3
561 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 - Microsoft MVP, Access and Data Platform) 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

831 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