![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Thanks for your responses. Unfortunately, enum is not available in Access 97. From various searches it would appear that one can declare constants, but how can you get them to show up in intellisense? I also tried to look at dim abc as combobox or as dropdown - but there didn't seem to be much info. Would this help me? |
#6
| |||
| |||
|
|
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? |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
All I have is VB4 (and no help on it either!) I assume since you mention VB6 that I can't do it in VB4? |
#9
| |||
| |||
|
|
All I have is VB4 (and no help on it either!) I assume since you mention VB6 that I can't do it in VB4? |
![]() |
| Thread Tools | |
| Display Modes | |
| |