We are wondering if there is a way to write a function, or perhaps a
class, that can do the following. When you start to type a built-in
Access function, when you start to type the function, you are prompted
for each parameter that needs to be passed. Often, you get a list of
choices (acPreview, acNormal etc.). Can we create this type of thing
in our own user defined functions? I know a class will show the
properties available in the class, but what we want to do seems to be
another level of choices.
For example, we found and worked with the class below. Now, lets say
the user starts to type CalculateSunrise.city. We'd like him to see
the list of available cities. Of course, we can do this on a form with
combo boxes but is there a way we can make it part of the class?
' ------ Class clsSunRiseSet
' Version 2.01
Option Explicit
Public frm As Form
' -- The following properties are exposed:
'Sunrise (r) - Sunrise time
'Sunset (r) - Sunset time
'SolarNoon (r) - Solar noon
'
'CityCount (r) - Number of cities
'CityName (r) - Name of city, by index
'City (w) - Sets the longitude/latitude/timezone based off a city
' name or city index
'TimeZone (r/w) - Current Timezone
'DaySavings (r/w) - Daylight savings time in effect
'Longitude (r/w) - Longitude to calculate for
'Latitude (r/w) - Latitude to calculate for
''DateDay (r/w) - Date to calculate for
''
' -- The following method is exposed
'CalculateSun - Calculate sunrise, sunset and solar noon
'
' Scott Seligman
' http://www.scottandmichelle.net/scott/
' Based off of
' http://www.srrb.noaa.gov/highlights/sunrise/gen.html