Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / January 2007

Tip: Looking for answers? Try searching our database.

Optional Arguments

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CLSWL - 30 Jan 2007 19:57 GMT
I have the following public function

Public Function Repeats(Combo As ComboBox, Combo1 As ComboBox, Optional
Combo2 As ComboBox)

It works fine when all the arguments are there, but i don't know what to do
when an argument is missing.

How do I capture the fact that there is no assigned value for Optional Combo2?
I have tried Combo2.value=Nothing , IsNull(Combo2.Value)=true, ...
What do you suggest.

I would like to do this so that i can say
If Combo2 doesn't have a value
Exit function
end if

Signature

-CLSWL

Perry - 30 Jan 2007 20:46 GMT
Function testing123(optional mycombo as comboBox = nothing) as Integer
   If seccombo is nothing then
       Msgbox "No combo entered"
   End if
End function

Krgrds,
Perry

>I have the following public function
>
[quoted text clipped - 14 lines]
> Exit function
> end if
CLSWL - 30 Jan 2007 20:54 GMT
"Is Nothing"... wow, thankyou.
Signature

-CLSWL

> Function testing123(optional mycombo as comboBox = nothing) as Integer
>     If seccombo is nothing then
[quoted text clipped - 23 lines]
> > Exit function
> > end if
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.