?
Solved

How do I check if a control variable has something assigned?

Posted on 2016-07-20
5
Medium Priority
?
53 Views
Last Modified: 2016-07-20
Hi Experts,

I have a sub that expects two optional variables, a control and a label.
How do I check if they contain something?

See attached.
untitled.png
0
Comment
Question by:bfuchs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 1400 total points
ID: 41722064
try check
If cNtrl Is Nothing Then

Open in new window

and
If lBl Is Nothing Then

Open in new window

0
 
LVL 4

Author Comment

by:bfuchs
ID: 41722075
Hi,

That worked, however got attached error in following line

Thanks,
Ben
untitled.png
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 600 total points
ID: 41722080
change
cNtrl=screen.activecontrol

with
set cNtrl=screen.activecontrol
0
 
LVL 53

Assisted Solution

by:Ryan Chong
Ryan Chong earned 1400 total points
ID: 41722083
try add Set in front of that statement?

Set object = Someotherobject
0
 
LVL 4

Author Closing Comment

by:bfuchs
ID: 41722135
Thank you experts!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

770 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