From gustav at cactus.dk Sat Aug 1 02:48:48 2020 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 1 Aug 2020 07:48:48 +0000 Subject: [AccessD] Can anyone help me? In-Reply-To: References: Message-ID: Hi John Please post a link when done. /gustav ________________________________ Fra: AccessD p? vegne af John Colby Sendt: 31. juli 2020 20:55 Til: Access Developers discussion and problem solving Emne: [AccessD] Can anyone help me? I wrote a framework back in the day. It resides in an Access library and I no longer have Access installed. Or any other Microsoft Office program for that matter. I remember that you could export modules (and classes) to text files. This was used under versions up to 2007 IIRC. Is anyone able to (and know how to) take my library MDA, export everything, and zip the files and send them to me? I'd like to place them on GIT as public code, as a demo of what i have done, albeit in the past. If you are able to do this, please email me and I will send a copy of the MDA. TIA John W. Colby -- John W. Colby Colby Consulting From jimdettman at verizon.net Sat Aug 1 03:59:48 2020 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 1 Aug 2020 04:59:48 -0400 Subject: [AccessD] Can anyone help me? In-Reply-To: References: Message-ID: <005101d667e2$1c52da30$54f88e90$@verizon.net> I didn't see John's original e-mail, but I can do that if you don't. Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Saturday, August 1, 2020 3:49 AM To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] Can anyone help me? Hi John Please post a link when done. /gustav ________________________________ Fra: AccessD p? vegne af John Colby Sendt: 31. juli 2020 20:55 Til: Access Developers discussion and problem solving Emne: [AccessD] Can anyone help me? I wrote a framework back in the day. It resides in an Access library and I no longer have Access installed. Or any other Microsoft Office program for that matter. I remember that you could export modules (and classes) to text files. This was used under versions up to 2007 IIRC. Is anyone able to (and know how to) take my library MDA, export everything, and zip the files and send them to me? I'd like to place them on GIT as public code, as a demo of what i have done, albeit in the past. If you are able to do this, please email me and I will send a copy of the MDA. TIA John W. Colby -- John W. Colby Colby Consulting -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at gmail.com Sat Aug 1 07:33:51 2020 From: jwcolby at gmail.com (John Colby) Date: Sat, 1 Aug 2020 08:33:51 -0400 Subject: [AccessD] Can anyone help me? In-Reply-To: <005101d667e2$1c52da30$54f88e90$@verizon.net> References: <005101d667e2$1c52da30$54f88e90$@verizon.net> Message-ID: It turns out I have Office 2007 installed on my old desktop. I figured it out this am and have it all exported. I can only assume that the version I found is the latest. Git didn't exist back then. :) So I have a 4gb RPi 4, booting off of an SSD (which is native nowadays). This is running PiHole and DNS over HTTPS (DOH), for my entire home network. I bought an 8gb RPI 4 because... well... if my Pi running PiHole corrupts it trashes my internet access. So I can't experiment there any more. 8GB on Rasbian is a TON of memory and so should hold up well to having a bunch of docker containers running. It too is running off of an SSD. In case you haven't looked recently, the Pi4 is now a very real, very powerful little machine. Meanwhile, I'm on a bender to learn a bunch of stuff. Git Raspberry Pi Rasbian. Works well, darned stable. But Linux. I'm getting there. Docker. Docker is really cool stuff but I don't yet really understand it. But it will be awesome on RaspPi. PiHole in Docker. I already have this running on bare metal Raspberry pi 4. PiHole is da bomb. Literally in the case of Adverts. DNS over HTTPS (DOH) in Docker. Already running on bare metal on Raspberry Pi 4. DuckDNS in Docker. Wireguard in Docker. Portainer And Reaper. I have a Midi keyboard talking to the Pi / Reaper. It works. I have a FocusRite I2I providing usb audio (in and out) working on the Pi. Sometimes. When it feels like it. With some serious clicks and pops. Sigh. Trying to do serious audio on the Pi / Rasbian is problematic. I'll just leave it at that. Once I get all that handled, then I want to get back into Python. With GIT to help me out on VC. Anyone with any interest in any of the above is welcome to get ahold of me. John W. Colby On Sat, Aug 1, 2020 at 5:00 AM Jim Dettman via AccessD < accessd at databaseadvisors.com> wrote: > > I didn't see John's original e-mail, but I can do that if you don't. > > Jim. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Gustav Brock via AccessD > Sent: Saturday, August 1, 2020 3:49 AM > To: Access Developers discussion and problem solving > Cc: Gustav Brock > Subject: Re: [AccessD] Can anyone help me? > > Hi John > > Please post a link when done. > > /gustav > > ________________________________ > Fra: AccessD p? vegne af John Colby > > Sendt: 31. juli 2020 20:55 > Til: Access Developers discussion and problem solving > > Emne: [AccessD] Can anyone help me? > > I wrote a framework back in the day. It resides in an Access library and I > no longer have Access installed. Or any other Microsoft Office program for > that matter. I remember that you could export modules (and classes) to > text files. This was used under versions up to 2007 IIRC. > > Is anyone able to (and know how to) take my library MDA, export everything, > and zip the files and send them to me? I'd like to place them on GIT as > public code, as a demo of what i have done, albeit in the past. > > If you are able to do this, please email me and I will send a copy of the > MDA. > > TIA > > John W. Colby > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- John W. Colby Colby Consulting From gustav at cactus.dk Mon Aug 3 10:16:57 2020 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 3 Aug 2020 15:16:57 +0000 Subject: [AccessD] Truly Random Numbers Message-ID: Hi all Recently, I came across a free and trustworthy option for retrieval of truly random numbers. It is ETH Z?rich that offers this API and, as it is quite simple to query, I wrote a set of functions in VBA to take advantage of it, including a direct replacement for Rnd(). Current code and demo are hosted here: https://github.com/GustavBrock/VBA.Random Full documentation is here: https://www.experts-exchange.com/articles/34471/Truly-Random-Numbers-in-VBA.html?preview=kYXBu8KHTtA%3D /gustav From rockysmolin2 at gmail.com Mon Aug 3 11:08:45 2020 From: rockysmolin2 at gmail.com (rocky smolin) Date: Mon, 3 Aug 2020 09:08:45 -0700 Subject: [AccessD] Truly Random Numbers In-Reply-To: References: Message-ID: <017701d669b0$5db98c10$192ca430$@gmail.com> Very interesting idea. Here's the white paper for those who want the details: https://marketing.idquantique.com/acton/attachment/11868/f-0226/1/ Please note new email address: rockysmolin2 at gmail.com? Rocky Smolin Beach Access Software 760-683-5777 -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Monday, August 03, 2020 8:17 AM To: Access Developers discussion and problem solving (accessd at databaseadvisors.com) Cc: Gustav Brock Subject: [AccessD] Truly Random Numbers Hi all Recently, I came across a free and trustworthy option for retrieval of truly random numbers. It is ETH Z?rich that offers this API and, as it is quite simple to query, I wrote a set of functions in VBA to take advantage of it, including a direct replacement for Rnd(). Current code and demo are hosted here: https://github.com/GustavBrock/VBA.Random Full documentation is here: https://www.experts-exchange.com/articles/34471/Truly-Random-Numbers-in-VBA. html?preview=kYXBu8KHTtA%3D /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Mon Aug 3 12:20:06 2020 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 3 Aug 2020 17:20:06 +0000 Subject: [AccessD] Truly Random Numbers In-Reply-To: <017701d669b0$5db98c10$192ca430$@gmail.com> References: , <017701d669b0$5db98c10$192ca430$@gmail.com> Message-ID: Thanks Rocky, I'll include that link. /gustav ________________________________ Fra: AccessD p? vegne af rocky smolin Sendt: 3. august 2020 18:08 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] Truly Random Numbers Very interesting idea. Here's the white paper for those who want the details: https://marketing.idquantique.com/acton/attachment/11868/f-0226/1/ Please note new email address: rockysmolin2 at gmail.com Rocky Smolin Beach Access Software 760-683-5777 -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Monday, August 03, 2020 8:17 AM To: Access Developers discussion and problem solving (accessd at databaseadvisors.com) Cc: Gustav Brock Subject: [AccessD] Truly Random Numbers Hi all Recently, I came across a free and trustworthy option for retrieval of truly random numbers. It is ETH Z?rich that offers this API and, as it is quite simple to query, I wrote a set of functions in VBA to take advantage of it, including a direct replacement for Rnd(). Current code and demo are hosted here: https://github.com/GustavBrock/VBA.Random Full documentation is here: https://www.experts-exchange.com/articles/34471/Truly-Random-Numbers-in-VBA. html?preview=kYXBu8KHTtA%3D /gustav From newsgrps at dalyn.co.nz Sun Aug 9 22:04:50 2020 From: newsgrps at dalyn.co.nz (newsgrps at dalyn.co.nz) Date: Mon, 10 Aug 2020 15:04:50 +1200 Subject: [AccessD] Calling API's from VBA Message-ID: <005501d66ec3$05881210$10983630$@dalyn.co.nz> Hi Listers, I have a client that wants to be able to call a web api to push data and then call another one to pull data back again. Does anyone know of resources that can give me guidance as how to do this in Access? Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From stuart at lexacorp.com.pg Sun Aug 9 23:13:31 2020 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 10 Aug 2020 14:13:31 +1000 Subject: [AccessD] Calling API's from VBA In-Reply-To: <005501d66ec3$05881210$10983630$@dalyn.co.nz> References: <005501d66ec3$05881210$10983630$@dalyn.co.nz> Message-ID: <5F30C96B.3339.13E97508@stuart.lexacorp.com.pg> There are several ways to do it. Gustav posted a method of getting data a few days ago using XMLHTTP https://github.com/GustavBrock/VBA.Random The actual module code is at https://github.com/GustavBrock/VBA.Random/blob/master/Random.bas The relevant part of that code for your purposes is the function: Private Function RetrieveDataResponse( _ ByVal ServiceUrl As String, _ ByRef ResponseText As String) _ As Boolean A variation of that using XmlHttp.Open "PUT", ServiceUrl, Async instead of XmlHttp.Open "GET", ServiceUrl, Async should work the other way. On 10 Aug 2020 at 15:04, newsgrps at dalyn.co.nz wrote: > Hi Listers, > > > > I have a client that wants to be able to call a web api to push data > and then call another one to pull data back again. > > > > Does anyone know of resources that can give me guidance as how to do > this in Access? > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > > > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From newsgrps at dalyn.co.nz Sun Aug 9 23:22:15 2020 From: newsgrps at dalyn.co.nz (newsgrps at dalyn.co.nz) Date: Mon, 10 Aug 2020 16:22:15 +1200 Subject: [AccessD] Calling API's from VBA In-Reply-To: <5F30C96B.3339.13E97508@stuart.lexacorp.com.pg> References: <005501d66ec3$05881210$10983630$@dalyn.co.nz> <5F30C96B.3339.13E97508@stuart.lexacorp.com.pg> Message-ID: <006201d66ecd$d6279e40$8276dac0$@dalyn.co.nz> Thanks Stuart, I missed that one. -----Original Message----- From: AccessD On Behalf Of Stuart McLachlan Sent: Monday, 10 August 2020 4:14 pm To: Access Developers discussion and problem solving Subject: Re: [AccessD] Calling API's from VBA There are several ways to do it. Gustav posted a method of getting data a few days ago using XMLHTTP https://github.com/GustavBrock/VBA.Random The actual module code is at https://github.com/GustavBrock/VBA.Random/blob/master/Random.bas The relevant part of that code for your purposes is the function: Private Function RetrieveDataResponse( _ ByVal ServiceUrl As String, _ ByRef ResponseText As String) _ As Boolean A variation of that using XmlHttp.Open "PUT", ServiceUrl, Async instead of XmlHttp.Open "GET", ServiceUrl, Async should work the other way. On 10 Aug 2020 at 15:04, newsgrps at dalyn.co.nz wrote: > Hi Listers, > > I have a client that wants to be able to call a web api to push data and then call another one to pull data back again. > > Does anyone know of resources that can give me guidance as how to do this in Access? > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand From jbartow at winhaven.net Thu Aug 13 14:05:37 2020 From: jbartow at winhaven.net (John Bartow) Date: Thu, 13 Aug 2020 19:05:37 +0000 Subject: [AccessD] Date Importing from Excel Message-ID: Hi All, I'm doing some Access work for the first time in years). It's a pretty simple little db and app. The exception being the importing of the old data from a spreadsheet. The spreadsheet is a mess and that's why they finally asked me for a better solution. This is so basic that I'm just doing an Access app so they can see there is life beyond spreadsheets. The biggest issue is the old data - specifically all of the date fields. Each date field has dozens of records where the data won't import unless I set them to short text. I have used queries in the past to add a date field and have the query convert the short text to dates where possible. And then I would use the new date field (where null) to find the old date text fields wouldn't convert so that I don't lose the badly formatted old date field data and can manually investigate it. Problem is none of my old DBs open in the latest access. How would you suggest I handle the old data? TIA, John B From rockysmolin2 at gmail.com Thu Aug 13 14:09:01 2020 From: rockysmolin2 at gmail.com (rocky smolin) Date: Thu, 13 Aug 2020 12:09:01 -0700 Subject: [AccessD] Date Importing from Excel In-Reply-To: References: Message-ID: <004a01d671a5$3506a9e0$9f13fda0$@gmail.com> I would add a text field and import the dates to that field. Then you can manipulate the text formatted dates from there. What of variations on the spreadsheet dates are you seeing that make them not be recognized as dates by the spreadsheet import to the database? r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow via AccessD Sent: Thursday, August 13, 2020 12:06 PM To: DBA-Access (AccessD at databaseadvisors.com) Cc: John Bartow Subject: [AccessD] Date Importing from Excel Hi All, I'm doing some Access work for the first time in years). It's a pretty simple little db and app. The exception being the importing of the old data from a spreadsheet. The spreadsheet is a mess and that's why they finally asked me for a better solution. This is so basic that I'm just doing an Access app so they can see there is life beyond spreadsheets. The biggest issue is the old data - specifically all of the date fields. Each date field has dozens of records where the data won't import unless I set them to short text. I have used queries in the past to add a date field and have the query convert the short text to dates where possible. And then I would use the new date field (where null) to find the old date text fields wouldn't convert so that I don't lose the badly formatted old date field data and can manually investigate it. Problem is none of my old DBs open in the latest access. How would you suggest I handle the old data? TIA, John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From garykjos at gmail.com Thu Aug 13 15:04:36 2020 From: garykjos at gmail.com (Gary Kjos) Date: Thu, 13 Aug 2020 15:04:36 -0500 Subject: [AccessD] Date Importing from Excel In-Reply-To: References: Message-ID: Hi John, I used to do these kind of imports often. My method was to import the data into text fields into a tblImportedData table. Then I would use that table to import into my real table. Alternatively it worked well for me to import as text. Then add another date type column and run UPDATE queries using the text version of the date info and parsing it into the correct format and use that re-formatted data to update the date type column. That would often take multiple passes, one for each version of the date. Depending on the number of records involved and how creative the various date formats are in the text column I sometimes would take the easiest way out and simply KEY IN the corrected data if there were only a small number of outliers. That is sometimes easier than working out the parsing etc. Good luck. GK On Thu, Aug 13, 2020 at 2:06 PM John Bartow via AccessD wrote: > > Hi All, > I'm doing some Access work for the first time in years). It's a pretty simple little db and app. The exception being the importing of the old data from a spreadsheet. The spreadsheet is a mess and that's why they finally asked me for a better solution. This is so basic that I'm just doing an Access app so they can see there is life beyond spreadsheets. > > The biggest issue is the old data - specifically all of the date fields. Each date field has dozens of records where the data won't import unless I set them to short text. > > I have used queries in the past to add a date field and have the query convert the short text to dates where possible. And then I would use the new date field (where null) to find the old date text fields wouldn't convert so that I don't lose the badly formatted old date field data and can manually investigate it. Problem is none of my old DBs open in the latest access. > > How would you suggest I handle the old data? > > TIA, > John B > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- Gary Kjos garykjos at gmail.com From stuart at lexacorp.com.pg Thu Aug 13 15:48:41 2020 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 14 Aug 2020 06:48:41 +1000 Subject: [AccessD] Date Importing from Excel In-Reply-To: References: , Message-ID: <5F35A729.3535.26EBA4F2@stuart.lexacorp.com.pg> Yep, That's my approach too. I've done in many times. On 13 Aug 2020 at 15:04, Gary Kjos wrote: > Hi John, > > I used to do these kind of imports often. My method was to import the > data into text fields into a tblImportedData table. Then I would use > that table to import into my real table. Alternatively it worked well > for me to import as text. Then add another date type column and run > UPDATE queries using the text version of the date info and parsing it > into the correct format and use that re-formatted data to update the > date type column. That would often take multiple passes, one for each > version of the date. > > Depending on the number of records involved and how creative the > various date formats are in the text column I sometimes would take the > easiest way out and simply KEY IN the corrected data if there were > only a small number of outliers. That is sometimes easier than > working out the parsing etc. > > Good luck. > > GK > > On Thu, Aug 13, 2020 at 2:06 PM John Bartow via AccessD > wrote: > > > > Hi All, > > I'm doing some Access work for the first time in years). It's a > > pretty simple little db and app. The exception being the importing > > of the old data from a spreadsheet. The spreadsheet is a mess and > > that's why they finally asked me for a better solution. This is so > > basic that I'm just doing an Access app so they can see there is > > life beyond spreadsheets. > > > > The biggest issue is the old data - specifically all of the date > > fields. Each date field has dozens of records where the data won't > > import unless I set them to short text. > > > > I have used queries in the past to add a date field and have the > > query convert the short text to dates where possible. And then I > > would use the new date field (where null) to find the old date text > > fields wouldn't convert so that I don't lose the badly formatted old > > date field data and can manually investigate it. Problem is none of > > my old DBs open in the latest access. > > > > How would you suggest I handle the old data? > > > > TIA, > > John B > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > -- > Gary Kjos > garykjos at gmail.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jbartow at winhaven.net Fri Aug 14 01:43:42 2020 From: jbartow at winhaven.net (John Bartow) Date: Fri, 14 Aug 2020 06:43:42 +0000 Subject: [AccessD] Date Importing from Excel In-Reply-To: References: Message-ID: Thanks all, So here's what I did with the queries data fields, insert built-in functions to convert the crap data, these are two of the fields (of many) in the make table query: DOB: IIf([DATE OF BIRTH],CDate([DATE OF BIRTH]),Null) ClientNotes: (IIf(IsDate([DATE OF BIRTH]),"",("DOB Note: " & [DATE OF BIRTH]) & " ?")) So when I create the Client table I get clean DOB dates and those that don't have clean data in the imported crap get a Client Note that the staff can figure out and update the client info on their time. John B PS I once again adequately hate spreadsheets. -----Original Message----- From: AccessD On Behalf Of John Bartow via AccessD Sent: Thursday, August 13, 2020 2:06 PM To: DBA-Access (AccessD at databaseadvisors.com) Cc: John Bartow Subject: [AccessD] Date Importing from Excel Hi All, I'm doing some Access work for the first time in years). It's a pretty simple little db and app. The exception being the importing of the old data from a spreadsheet. The spreadsheet is a mess and that's why they finally asked me for a better solution. This is so basic that I'm just doing an Access app so they can see there is life beyond spreadsheets. The biggest issue is the old data - specifically all of the date fields. Each date field has dozens of records where the data won't import unless I set them to short text. I have used queries in the past to add a date field and have the query convert the short text to dates where possible. And then I would use the new date field (where null) to find the old date text fields wouldn't convert so that I don't lose the badly formatted old date field data and can manually investigate it. Problem is none of my old DBs open in the latest access. How would you suggest I handle the old data? TIA, John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Fri Aug 14 02:20:48 2020 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 14 Aug 2020 17:20:48 +1000 Subject: [AccessD] Date Importing from Excel In-Reply-To: References: , Message-ID: <5F363B50.12108.292E5D05@stuart.lexacorp.com.pg> Talking of Excel and dates, my other pet hate is Excel wanting to be the default opener for text filesand conveniently altering text strings to dates in comma and tab delimited data files.. I ran into this years ago when it kept changing analysis results which has values like "Sep2" to "2 September XXXX" I see that Geneticists have decided to change their gene naming rules because of this. https://www.theregister.com/2020/08/06/excel_gene_names/ On 14 Aug 2020 at 6:43, John Bartow via AccessD wrote: > Thanks all, > So here's what I did with the queries data fields, insert built-in > functions to convert the crap data, these are two of the fields (of > many) in the make table query: DOB: IIf([DATE OF BIRTH],CDate([DATE OF > BIRTH]),Null) ClientNotes: (IIf(IsDate([DATE OF BIRTH]),"",("DOB Note: > " & [DATE OF BIRTH]) & " ?")) > > So when I create the Client table I get clean DOB dates and those that > don't have clean data in the imported crap get a Client Note that the > staff can figure out and update the client info on their time. > > John B > PS I once again adequately hate spreadsheets. > > -----Original Message----- > From: AccessD On Behalf Of John > Bartow via AccessD Sent: Thursday, August 13, 2020 2:06 PM To: > DBA-Access (AccessD at databaseadvisors.com) > Cc: John Bartow > Subject: [AccessD] Date Importing from Excel > > Hi All, > I'm doing some Access work for the first time in years). It's a pretty > simple little db and app. The exception being the importing of the old > data from a spreadsheet. The spreadsheet is a mess and that's why they > finally asked me for a better solution. This is so basic that I'm just > doing an Access app so they can see there is life beyond spreadsheets. > > > The biggest issue is the old data - specifically all of the date > fields. Each date field has dozens of records where the data won't > import unless I set them to short text. > > I have used queries in the past to add a date field and have the query > convert the short text to dates where possible. And then I would use > the new date field (where null) to find the old date text fields > wouldn't convert so that I don't lose the badly formatted old date > field data and can manually investigate it. Problem is none of my old > DBs open in the latest access. > > How would you suggest I handle the old data? > > TIA, > John B > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jbartow at winhaven.net Fri Aug 14 13:32:31 2020 From: jbartow at winhaven.net (John Bartow) Date: Fri, 14 Aug 2020 18:32:31 +0000 Subject: [AccessD] Date Importing from Excel In-Reply-To: <5F363B50.12108.292E5D05@stuart.lexacorp.com.pg> References: , <5F363B50.12108.292E5D05@stuart.lexacorp.com.pg> Message-ID: Yes, I agree. Funny thing is that with the last version of Excel it kept prompting me to set it as default for .xlsx files every time I opened one, even though it was set as default. I set notepad as the default for .csv, .txt and other files that I don't want corrupted. My conspiracy theory is that Excel checks those as it opens and prompts people to do this just so they give up and make it default for everything to wants to be default for. I reviewed some of the records that I imported into my Client table and most of those were just poorly entered dates and bad pastings. Some were actually 2 people listed with their DOBs. But in any case, not my problem now! John B -----Original Message----- From: AccessD On Behalf Of Stuart McLachlan Sent: Friday, August 14, 2020 2:21 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Date Importing from Excel Talking of Excel and dates, my other pet hate is Excel wanting to be the default opener for text filesand conveniently altering text strings to dates in comma and tab delimited data files.. I ran into this years ago when it kept changing analysis results which has values like "Sep2" to "2 September XXXX" I see that Geneticists have decided to change their gene naming rules because of this. https://www.theregister.com/2020/08/06/excel_gene_names/ On 14 Aug 2020 at 6:43, John Bartow via AccessD wrote: > Thanks all, > So here's what I did with the queries data fields, insert built-in > functions to convert the crap data, these are two of the fields (of > many) in the make table query: DOB: IIf([DATE OF BIRTH],CDate([DATE OF > BIRTH]),Null) ClientNotes: (IIf(IsDate([DATE OF BIRTH]),"",("DOB Note: > " & [DATE OF BIRTH]) & " ?")) > > So when I create the Client table I get clean DOB dates and those that > don't have clean data in the imported crap get a Client Note that the > staff can figure out and update the client info on their time. > > John B > PS I once again adequately hate spreadsheets. > > -----Original Message----- > From: AccessD On Behalf Of John > Bartow via AccessD Sent: Thursday, August 13, 2020 2:06 PM To: > DBA-Access (AccessD at databaseadvisors.com) > Cc: John Bartow > Subject: [AccessD] Date Importing from Excel > > Hi All, > I'm doing some Access work for the first time in years). It's a pretty > simple little db and app. The exception being the importing of the old > data from a spreadsheet. The spreadsheet is a mess and that's why they > finally asked me for a better solution. This is so basic that I'm just > doing an Access app so they can see there is life beyond spreadsheets. > > > The biggest issue is the old data - specifically all of the date > fields. Each date field has dozens of records where the data won't > import unless I set them to short text. > > I have used queries in the past to add a date field and have the query > convert the short text to dates where possible. And then I would use > the new date field (where null) to find the old date text fields > wouldn't convert so that I don't lose the badly formatted old date > field data and can manually investigate it. Problem is none of my old > DBs open in the latest access. > > How would you suggest I handle the old data? > > TIA, > John B > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin2 at gmail.com Sat Aug 15 14:29:28 2020 From: rockysmolin2 at gmail.com (rocky smolin) Date: Sat, 15 Aug 2020 12:29:28 -0700 Subject: [AccessD] Solution Seeks Problem Message-ID: <007501d6733a$65368ea0$2fa3abe0$@gmail.com> The other day my desktop went wonky on me. The distance between the icons both vertically and horizontally increased. I didn?t do anything to cause this (that I know of), but it?s Windows, so you don?t have to do anything. Just use it and random things will go wrong without any effort on your part. (To be fair Windows 10 has been their most solid OS, IMO But I digress ) Google, being my friend, found the answer ? not to the cause, but how to fix. It?s an edit of the registry: HKEY_CURRENT_USER ? Control Panel ? Desktop ? WindowMetrics There you can modify IconSpacing (the value for horizontal spacing) and IconVerticalSpacing The legal values go from -480 to -2730 with the (absolute) larger number giving more space between the icons. The default value is -1125 but for some unknown reason, something changed them both to -1700 something. Changed them back and everything spaced out correctly on the desktop. In my search for a solution I noted a couple of references to windows updates causing this. So perhaps Anyway, I thought I would post in case someone else runs into the same snafu. Best, Rocky Smolin Beach Access Software From jamesbutton at blueyonder.co.uk Sat Aug 15 15:52:26 2020 From: jamesbutton at blueyonder.co.uk (James Button) Date: Sat, 15 Aug 2020 21:52:26 +0100 Subject: [AccessD] Solution Seeks Problem In-Reply-To: <007501d6733a$65368ea0$2fa3abe0$@gmail.com> References: <007501d6733a$65368ea0$2fa3abe0$@gmail.com> Message-ID: Re weirdness - Yes That's what U get with MICROSOFT windows I have found that when Microsoft apply substantial updates to the system, it may take a fair while ( OJ a few days) before the reportedly Installed updates get integrated into the software on the system - or the software gets integrated into the new Windows files, As in 1909 - Install completed and 3rd reboot within the hour resetting the software that 1909 had disabled - such as the multimedia 0 extra codecs, re restricting indexing etc. Paragon backup re activation ... Incremental backup was about 20GB Then - after 3 days of abysmal responsiveness with many "svchost.exe" tasks running - sometimes around 100 of them, the incremental backup was another 14GB - And those are ontop of the basics that were a normal part of my daily activities. During that bulk SVCHOST.exe processing many apps were giving unexpected results - I suspect because parts were integrated into the new file versions etc. and others were not. OH! and having had 2004 installed - Media player is an "Optional" facility and may need to be "ADDED" to the active facilities, and the codecs reacquired from Microsoft, when you can get a download and install to complete without the MS Account server appearing to drop the recognition that you are a Microsoft Account holder and thus allowed to get the codecs etc. Oh! - and for your added security, you may find that USB connected devices are now automatically checked to see if anything can be autoplayed/Autorun rather than your previous settings of show the content of the device. Thank you Microsoft for your concern and help in maintaining the security of your OS as you set it to run on my PC Rant over => back to trying to upload the backup set of 4GB files to the Onedrive store. Oh - and IE seems to not only upload slightly faster, but also seems to succeed mostly , and report problems if it fails - while EDGE sessions just disappear. JimB -----Original Message----- From: AccessD On Behalf Of rocky smolin Sent: Saturday, August 15, 2020 8:29 PM To: 'Off Topic' ; List ; accessd at databaseadvisors.com Subject: [AccessD] Solution Seeks Problem The other day my desktop went wonky on me. The distance between the icons both vertically and horizontally increased. I didn?t do anything to cause this (that I know of), but it?s Windows, so you don?t have to do anything. Just use it and random things will go wrong without any effort on your part. (To be fair Windows 10 has been their most solid OS, IMO But I digress ) Google, being my friend, found the answer ? not to the cause, but how to fix. It?s an edit of the registry: HKEY_CURRENT_USER ? Control Panel ? Desktop ? WindowMetrics There you can modify IconSpacing (the value for horizontal spacing) and IconVerticalSpacing The legal values go from -480 to -2730 with the (absolute) larger number giving more space between the icons. The default value is -1125 but for some unknown reason, something changed them both to -1700 something. Changed them back and everything spaced out correctly on the desktop. In my search for a solution I noted a couple of references to windows updates causing this. So perhaps Anyway, I thought I would post in case someone else runs into the same snafu. Best, Rocky Smolin Beach Access Software -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin2 at gmail.com Sat Aug 15 16:06:47 2020 From: rockysmolin2 at gmail.com (rocky smolin) Date: Sat, 15 Aug 2020 14:06:47 -0700 Subject: [AccessD] Solution Seeks Problem In-Reply-To: References: <007501d6733a$65368ea0$2fa3abe0$@gmail.com> Message-ID: <008701d67347$fd5c5f90$f8151eb0$@gmail.com> What is with all those SVCHOST processes? I wonder if I need them all. Sometimes I think I'll just suspend the one by one and see which ones I really need. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of James Button via AccessD Sent: Saturday, August 15, 2020 1:52 PM To: 'Access Developers discussion and problem solving' Cc: James Button Subject: Re: [AccessD] Solution Seeks Problem Re weirdness - Yes That's what U get with MICROSOFT windows I have found that when Microsoft apply substantial updates to the system, it may take a fair while ( OJ a few days) before the reportedly Installed updates get integrated into the software on the system - or the software gets integrated into the new Windows files, As in 1909 - Install completed and 3rd reboot within the hour resetting the software that 1909 had disabled - such as the multimedia 0 extra codecs, re restricting indexing etc. Paragon backup re activation ... Incremental backup was about 20GB Then - after 3 days of abysmal responsiveness with many "svchost.exe" tasks running - sometimes around 100 of them, the incremental backup was another 14GB - And those are ontop of the basics that were a normal part of my daily activities. During that bulk SVCHOST.exe processing many apps were giving unexpected results - I suspect because parts were integrated into the new file versions etc. and others were not. OH! and having had 2004 installed - Media player is an "Optional" facility and may need to be "ADDED" to the active facilities, and the codecs reacquired from Microsoft, when you can get a download and install to complete without the MS Account server appearing to drop the recognition that you are a Microsoft Account holder and thus allowed to get the codecs etc. Oh! - and for your added security, you may find that USB connected devices are now automatically checked to see if anything can be autoplayed/Autorun rather than your previous settings of show the content of the device. Thank you Microsoft for your concern and help in maintaining the security of your OS as you set it to run on my PC Rant over => back to trying to upload the backup set of 4GB files to the Onedrive store. Oh - and IE seems to not only upload slightly faster, but also seems to succeed mostly , and report problems if it fails - while EDGE sessions just disappear. JimB -----Original Message----- From: AccessD On Behalf Of rocky smolin Sent: Saturday, August 15, 2020 8:29 PM To: 'Off Topic' ; List ; accessd at databaseadvisors.com Subject: [AccessD] Solution Seeks Problem The other day my desktop went wonky on me. The distance between the icons both vertically and horizontally increased. I didn?t do anything to cause this (that I know of), but it?s Windows, so you don?t have to do anything. Just use it and random things will go wrong without any effort on your part. (To be fair Windows 10 has been their most solid OS, IMO But I digress ) Google, being my friend, found the answer ? not to the cause, but how to fix. It?s an edit of the registry: HKEY_CURRENT_USER ? Control Panel ? Desktop ? WindowMetrics There you can modify IconSpacing (the value for horizontal spacing) and IconVerticalSpacing The legal values go from -480 to -2730 with the (absolute) larger number giving more space between the icons. The default value is -1125 but for some unknown reason, something changed them both to -1700 something. Changed them back and everything spaced out correctly on the desktop. In my search for a solution I noted a couple of references to windows updates causing this. So perhaps Anyway, I thought I would post in case someone else runs into the same snafu. Best, Rocky Smolin Beach Access Software -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at gmail.com Wed Aug 26 17:11:08 2020 From: jwcolby at gmail.com (John Colby) Date: Wed, 26 Aug 2020 18:11:08 -0400 Subject: [AccessD] Classes and events stuff pushed to Github Message-ID: https://github.com/jwcolby54/VBA-Classes I have pushed a ton of stuff to github for archival purposes. Anyone interested is welcome to dig through it. -- John W. Colby Colby Consulting From fuller.artful at gmail.com Wed Aug 26 21:17:39 2020 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 26 Aug 2020 22:17:39 -0400 Subject: [AccessD] Classes and events stuff pushed to Github In-Reply-To: References: Message-ID: Thanks for your contribution to the pool of Access knowledge. On Wed, Aug 26, 2020 at 6:12 PM John Colby wrote: > https://github.com/jwcolby54/VBA-Classes > > I have pushed a ton of stuff to github for archival purposes. Anyone > interested is welcome to dig through it. > > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Arthur From bensonforums at gmail.com Thu Aug 27 00:09:42 2020 From: bensonforums at gmail.com (Bill Benson) Date: Thu, 27 Aug 2020 01:09:42 -0400 Subject: [AccessD] Classes and events stuff pushed to Github In-Reply-To: References: Message-ID: John is a treasure and his works a treasure trove! On Wed, Aug 26, 2020 at 10:18 PM Arthur Fuller wrote: > Thanks for your contribution to the pool of Access knowledge. > > > > On Wed, Aug 26, 2020 at 6:12 PM John Colby wrote: > > > > > https://github.com/jwcolby54/VBA-Classes > > > > > > I have pushed a ton of stuff to github for archival purposes. Anyone > > > interested is welcome to dig through it. > > > > > > > > > -- > > > John W. Colby > > > Colby Consulting > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > > > > -- > > Arthur > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > From gustav at cactus.dk Thu Aug 27 01:31:17 2020 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 27 Aug 2020 06:31:17 +0000 Subject: [AccessD] Classes and events stuff pushed to Github Message-ID: Hi John Great! I have several times referred to your old pages on WithEvents which still are on-line, but who knows for how long? You could turn the doc files into HTML files (Word can do "save as html") and then use GitHub's HTML viewer via a direct URL. I did this recently with the documentation to my rounding functions. MZ-Tools can generate an HTML file holding the documentation you have added to modules and functions directly from the VBE. The generated file I have saved in the repository, and in the ReadMe at: https://github.com/GustavBrock/VBA.Round I now have a link to it (one line): https://htmlpreview.github.io/?https://github.com/GustavBrock/VBA.Round/blob/master/documentation/Access/Rounding.htm Simple and fast. /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af John Colby Sendt: 27. august 2020 00:11 Til: Access Developers discussion and problem solving Emne: [AccessD] Classes and events stuff pushed to Github https://github.com/jwcolby54/VBA-Classes I have pushed a ton of stuff to github for archival purposes. Anyone interested is welcome to dig through it. -- John W. Colby Colby Consulting From jackandpat.d at gmail.com Thu Aug 27 07:04:29 2020 From: jackandpat.d at gmail.com (jack drawbridge) Date: Thu, 27 Aug 2020 08:04:29 -0400 Subject: [AccessD] Classes and events stuff pushed to Github In-Reply-To: References: Message-ID: Thank you John! On Wed, Aug 26, 2020 at 6:12 PM John Colby wrote: > https://github.com/jwcolby54/VBA-Classes > > I have pushed a ton of stuff to github for archival purposes. Anyone > interested is welcome to dig through it. > > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From tinanfields at torchlake.com Thu Aug 27 07:55:21 2020 From: tinanfields at torchlake.com (Tina N Fields) Date: Thu, 27 Aug 2020 08:55:21 -0400 Subject: [AccessD] Classes and events stuff pushed to Github In-Reply-To: References: Message-ID: <0437f03e-1e87-505b-228c-3ea7cf82676f@torchlake.com> Thanks so much, John. You have been a great help and inspiration to me. T Tina Norris Fields 231-322-2787 tinanfields-at-torchlake-dot-com On 8/26/2020 6:11 PM, John Colby wrote: > https://github.com/jwcolby54/VBA-Classes > > I have pushed a ton of stuff to github for archival purposes. Anyone > interested is welcome to dig through it. > > From jwcolby at gmail.com Thu Aug 27 11:01:41 2020 From: jwcolby at gmail.com (John Colby) Date: Thu, 27 Aug 2020 12:01:41 -0400 Subject: [AccessD] Classes and events Message-ID: I also uploaded a bunch of Access databases with examples of classes. I haven't opened access in a few years. Is anyone out there still actively developing i Access? -- John W. Colby Colby Consulting From rockysmolin2 at gmail.com Thu Aug 27 11:19:13 2020 From: rockysmolin2 at gmail.com (rocky smolin) Date: Thu, 27 Aug 2020 09:19:13 -0700 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: <019d01d67c8d$ce3fd0d0$6abf7270$@gmail.com> I officially retired end of 2019 but I still have 1/2 a dozen clients who call me from time to time to add features, etc. And I've gotten a couple of jobs on referral. It's fun, low pressure, and I keep my hand in and my skills refreshed (although for what I'm not sure). r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Thursday, August 27, 2020 9:02 AM To: Access Developers discussion and problem solving Subject: [AccessD] Classes and events I also uploaded a bunch of Access databases with examples of classes. I haven't opened access in a few years. Is anyone out there still actively developing i Access? -- John W. Colby Colby Consulting -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jbartow at winhaven.net Thu Aug 27 11:42:55 2020 From: jbartow at winhaven.net (John Bartow) Date: Thu, 27 Aug 2020 16:42:55 +0000 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: Hadn't for a few years but just got a couple of Access jobs going in the last 2 months. John B -----Original Message----- From: AccessD On Behalf Of John Colby Sent: Thursday, August 27, 2020 11:02 AM To: Access Developers discussion and problem solving Subject: [AccessD] Classes and events I also uploaded a bunch of Access databases with examples of classes. I haven't opened access in a few years. Is anyone out there still actively developing i Access? -- John W. Colby Colby Consulting -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Thu Aug 27 15:07:05 2020 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 27 Aug 2020 20:07:05 +0000 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: Hi John Indeed, but mostly maintenance. For new projects, I prefer C#. /gustav ________________________________ Fra: AccessD p? vegne af John Colby Sendt: 27. august 2020 18:01 Til: Access Developers discussion and problem solving Emne: [AccessD] Classes and events I also uploaded a bunch of Access databases with examples of classes. I haven't opened access in a few years. Is anyone out there still actively developing i Access? -- John W. Colby Colby Consulting From stuart at lexacorp.com.pg Thu Aug 27 23:55:12 2020 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 28 Aug 2020 14:55:12 +1000 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: <5F488E30.16558.508C960@stuart.lexacorp.com.pg> I'm still using Access quite a bit. Often with more robust MySQL or SQL Server backends. On 27 Aug 2020 at 12:01, John Colby wrote: > I also uploaded a bunch of Access databases with examples of classes. > I haven't opened access in a few years. Is anyone out there still > actively developing i Access? > > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From bensonforums at gmail.com Fri Aug 28 00:40:10 2020 From: bensonforums at gmail.com (Bill Benson) Date: Fri, 28 Aug 2020 01:40:10 -0400 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: Nope :( On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > I also uploaded a bunch of Access databases with examples of classes. I > > haven't opened access in a few years. Is anyone out there still actively > > developing i Access? > > > > > > -- > > John W. Colby > > Colby Consulting > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > From bensonforums at gmail.com Fri Aug 28 00:42:09 2020 From: bensonforums at gmail.com (Bill Benson) Date: Fri, 28 Aug 2020 01:42:09 -0400 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: But just a note asking a question about ?out there? to people ?in here? may not be the asking the right place. On Fri, Aug 28, 2020 at 1:40 AM Bill Benson wrote: > Nope :( > > On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > >> I also uploaded a bunch of Access databases with examples of classes. I >> >> haven't opened access in a few years. Is anyone out there still actively >> >> developing i Access? >> >> >> >> >> >> -- >> >> John W. Colby >> >> Colby Consulting >> >> -- >> >> AccessD mailing list >> >> AccessD at databaseadvisors.com >> >> http://databaseadvisors.com/mailman/listinfo/accessd >> >> Website: http://www.databaseadvisors.com >> >> > > From newsgrps at dalyn.co.nz Fri Aug 28 03:18:36 2020 From: newsgrps at dalyn.co.nz (newsgrps at dalyn.co.nz) Date: Fri, 28 Aug 2020 20:18:36 +1200 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: <00cd01d67d13$d74089f0$85c19dd0$@dalyn.co.nz> Always been my bread and butter (and occasionally cake too ?) Regards David Emerson Dalyn Software Ltd Wellington, New Zealand -----Original Message----- From: AccessD On Behalf Of Bill Benson Sent: Friday, 28 August 2020 5:42 pm To: Access Developers discussion and problem solving Subject: Re: [AccessD] Classes and events But just a note asking a question about ?out there? to people ?in here? may not be the asking the right place. On Fri, Aug 28, 2020 at 1:40 AM Bill Benson wrote: > Nope :( > > On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > >> I also uploaded a bunch of Access databases with examples of classes. >> I >> >> haven't opened access in a few years. Is anyone out there still >> actively >> >> developing i Access? >> >> >> >> >> >> -- >> >> John W. Colby >> >> Colby Consulting >> >> -- >> >> AccessD mailing list >> >> AccessD at databaseadvisors.com >> >> http://databaseadvisors.com/mailman/listinfo/accessd >> >> Website: http://www.databaseadvisors.com >> >> > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Fri Aug 28 07:16:56 2020 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 28 Aug 2020 08:16:56 -0400 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: <010001d67d35$1f726e20$5e574a60$@verizon.net> I don't have John's original e-mail for some reason... Still going strong with Access. There is a little C#/.Net thrown in, but my main focus is the the SMB market and doing totally custom stuff, which is where Access fits so well. Jim. -----Original Message----- From: AccessD On Behalf Of Bill Benson Sent: Friday, August 28, 2020 1:40 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Classes and events Nope :( On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > I also uploaded a bunch of Access databases with examples of classes. I > > haven't opened access in a few years. Is anyone out there still actively > > developing i Access? > > > > > > -- > > John W. Colby > > Colby Consulting > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From mar.ko at verizon.net Fri Aug 28 07:48:18 2020 From: mar.ko at verizon.net (Mark Simms) Date: Fri, 28 Aug 2020 12:48:18 +0000 (UTC) Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: <947714461.660542.1598618898223@mail.yahoo.com> I am supporting a large Access application that I wrote over 5 years ago. My client tried to get quotes for replacing it, but they were over 1/2 million dollars....so the app still stands. Mark Simms marksimms at verizon.net -----Original Message----- From: Bill Benson To: Access Developers discussion and problem solving Sent: Fri, Aug 28, 2020 1:42 am Subject: Re: [AccessD] Classes and events But just a note asking a question about ?out there? to people ?in here? may not be the asking the right place. On Fri, Aug 28, 2020 at 1:40 AM Bill Benson wrote: > Nope :( > > On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > >> I also uploaded a bunch of Access databases with examples of classes.? I >> >> haven't opened access in a few years. Is anyone out there still actively >> >> developing i Access? >> >> >> >> >> >> -- >> >> John W. Colby >> >> Colby Consulting >> >> -- >> >> AccessD mailing list >> >> AccessD at databaseadvisors.com >> >> http://databaseadvisors.com/mailman/listinfo/accessd >> >> Website: http://www.databaseadvisors.com >> >> > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at gmail.com Fri Aug 28 08:49:21 2020 From: jwcolby at gmail.com (John Colby) Date: Fri, 28 Aug 2020 09:49:21 -0400 Subject: [AccessD] Classes and withevents Message-ID: Of those still doing access development, do you you use classes and if so how? Do you use event sinking and sourcing in classes and if so how? From gustav at cactus.dk Fri Aug 28 08:58:09 2020 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 28 Aug 2020 13:58:09 +0000 Subject: [AccessD] Classes and withevents Message-ID: Hi John Only little, I have a class for open file, and I made one for exporting invoices and invoice lines. Otherwise, most for fun - like: https://github.com/GustavBrock/VBA.ModernTheme /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af John Colby Sendt: 28. august 2020 15:49 Til: Access Developers discussion and problem solving Emne: [AccessD] Classes and withevents Of those still doing access development, do you you use classes and if so how? Do you use event sinking and sourcing in classes and if so how? From df.waters at outlook.com Fri Aug 28 09:41:52 2020 From: df.waters at outlook.com (Daniel Waters) Date: Fri, 28 Aug 2020 14:41:52 +0000 Subject: [AccessD] Classes and events In-Reply-To: <947714461.660542.1598618898223@mail.yahoo.com> References: , <947714461.660542.1598618898223@mail.yahoo.com> Message-ID: Hi Mark, I?ve done the same myself. I?m curious what we each consider to be ?a large Access application? how many lines of code are in it? The four I?ve written were all between 50K and 80K LOC. MZ Tools has a quick LOC counting feature. Thanks! Dan Sent from Mail for Windows 10 From: Mark Simms via AccessD Sent: Friday, August 28, 2020 7:53 AM To: accessd at databaseadvisors.com Cc: Mark Simms Subject: Re: [AccessD] Classes and events I am supporting a large Access application that I wrote over 5 years ago. My client tried to get quotes for replacing it, but they were over 1/2 million dollars....so the app still stands. Mark Simms marksimms at verizon.net -----Original Message----- From: Bill Benson To: Access Developers discussion and problem solving Sent: Fri, Aug 28, 2020 1:42 am Subject: Re: [AccessD] Classes and events But just a note asking a question about ?out there? to people ?in here? may not be the asking the right place. On Fri, Aug 28, 2020 at 1:40 AM Bill Benson wrote: > Nope :( > > On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > >> I also uploaded a bunch of Access databases with examples of classes. I >> >> haven't opened access in a few years. Is anyone out there still actively >> >> developing i Access? >> >> >> >> >> >> -- >> >> John W. Colby >> >> Colby Consulting >> >> -- >> >> AccessD mailing list >> >> AccessD at databaseadvisors.com >> >> http://databaseadvisors.com/mailman/listinfo/accessd >> >> Website: http://www.databaseadvisors.com >> >> > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Fri Aug 28 11:17:36 2020 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 28 Aug 2020 12:17:36 -0400 Subject: [AccessD] Classes and withevents In-Reply-To: References: Message-ID: <016501d67d56$be504780$3af0d680$@verizon.net> John, I have a half dozen classes at best that I use and I rarely use withevents. I find it far easier to plug properties with calls to standard procedures via code than dealing with hooking up classes to everything. I've seen a lot of Access apps too, and if I had to put a number on it, I'd say it's less than 1% that use them extensively. If VBA had full inheritance, it might be a different story, but alas it does not. Jim. -----Original Message----- From: AccessD On Behalf Of John Colby Sent: Friday, August 28, 2020 9:49 AM To: Access Developers discussion and problem solving Subject: [AccessD] Classes and withevents Of those still doing access development, do you you use classes and if so how? Do you use event sinking and sourcing in classes and if so how? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Fri Aug 28 11:41:12 2020 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Fri, 28 Aug 2020 09:41:12 -0700 Subject: [AccessD] Classes and withevents In-Reply-To: References: Message-ID: When I was active, I used classes and withevents in pretty much every application. Now I'm involuntarily retired, but I think a lot of newer developers never learn the power of classes. There was also always the downside that an error could break the entire application and leave a user frozen in place. For those of us who liked pushing Access to its limits, classes were great! Charlotte Foust (916) 206-4336 On Fri, Aug 28, 2020 at 6:50 AM John Colby wrote: > Of those still doing access development, do you you use classes and if so > how? > > Do you use event sinking and sourcing in classes and if so how? > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at gmail.com Fri Aug 28 13:18:56 2020 From: jwcolby at gmail.com (John Colby) Date: Fri, 28 Aug 2020 14:18:56 -0400 Subject: [AccessD] Classes and withevents In-Reply-To: References: Message-ID: As for me, I discovered classes about midway through my career in Access. They do not have inheritance, but they do provide encapsulation of code nd data and they can sink events from any Access object that raises events, and can themselves raise events. Everything in Access is a class. Every control, every form, every recordset everything. All controls and the forms raise events. Yes you can hook the events in the form's class via the form's property sheet but that is truly kludgy. Essentially the form's class is now tasked with being an event sink for control objects. If you have one or a dozen combo boxes and you want to hook the events, all those event sinks are held in the form's class. OnEnter, OnExit, OnClick, etc etc, event sinks for non-form objects sunk in a form class. I discovered how to make what I called "wrapper classes", i.e. classes which "wrap" an object like a text box, a list, box, a combo box, a radio button etc. You name it, I had a wrapper class for that control. I actually wrote a form class which would scan the form as it instantiated looking for controls, and when found I would "wrap" the control in it's own class. These classes then had event sinks for every control event that I cared to handle. So if there were (for example) a dozen text boxes, the control scanner would find each text box, instantiated a text vox class, pass in the pointer to that specific text box, and save it "withevents" in the header of the class. At that point, that class could sink any and all events for that one text box. I would then store every control class created by the form class' control scanner code in the form "wrapper class" which had a collection to store pointers to the control classes. Given this framework, instantiating a form wrapper class would find and initialize all controls on any form. Voila, done. It would likewise tear it all down when the form closed. I used this for things like... In a form, I wanted a standard back ground color for controls. But how do you inform the user which control has the focus? You sink the OnEnter andGotFocus events in the control's wrapper class. As a control gets the focus, the event is sunk in the wrapper class, which then stores the current color, and changes the background color to something else. Whatever control has the focus now "automatically" changes color as it gets the focus (or onEnter) and switches the color bask as it loses focus (or onExit). All automatically. The code is written once when I designed the wrapper class, and now it "just works", every time, every where, every form, every control on every form. Another example. I wanted combos to be able to open a form to edit the data displayed in the combo. If the combo is loaded from a table, then a Double click would open a form to allow the user to add, edit, or delete the data in that table. When that form closed, the combo needs to requery itself. How do you do that you ask? The combo "wrapper class" has all the code to do that. The onClick event discovers which table the data is coming from and opens the form for editing that table. As the edit form closes, the combo wrapper class requeries the combo. All automatically, every time, every where. Class wrapper code written once, then it "just works" Every combo is discovered by the form clss' Control scanner and "wrapped" in a class which handles all that. As well as the aforementioned background color stuff. Classes, and event sinks for controls are waaaay powerful stuff. Nope, I couldn't inherit the control, but I could "wrap" the control in a class which sank it's events and performed whatever processing, whatever behavior I, the UI interface designer decides was useful. And that stuff is what is contained in the examples I pushed to GIt. On Fri, Aug 28, 2020 at 12:41 PM Charlotte Foust wrote: > When I was active, I used classes and withevents in pretty much every > application. Now I'm involuntarily retired, but I think a lot of newer > developers never learn the power of classes. There was also always the > downside that an error could break the entire application and leave a user > frozen in place. For those of us who liked pushing Access to its limits, > classes were great! > > Charlotte Foust > (916) 206-4336 > > > On Fri, Aug 28, 2020 at 6:50 AM John Colby wrote: > > > Of those still doing access development, do you you use classes and if so > > how? > > > > Do you use event sinking and sourcing in classes and if so how? > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- John W. Colby Colby Consulting From jwcolby at gmail.com Fri Aug 28 13:35:56 2020 From: jwcolby at gmail.com (John Colby) Date: Fri, 28 Aug 2020 14:35:56 -0400 Subject: [AccessD] Classes and events In-Reply-To: References: <947714461.660542.1598618898223@mail.yahoo.com> Message-ID: For me, the largest app I ever wrote in Access was a call center app for a disability insurance processing company. It was about 180 tables by the time I left. At least one form for each table. Sometimes two if I needed a standalone data entry form and a subform for a given table. Plus reports. The framework I discussed in a new post was instantiated once for the app, and then each form would load a wrapper class for itself, whenever it loaded with the control scanner, which would wrap every control in it's own class. Automatic setup as a form loads, and teardown as a form closes. My framework was where most of the code lived for the app. Only the case of "one off" functionality specific to the business rules of the app would live inside of modules or classes in the app itself. The framework was a library. I had an agreement that the framework belonged to me, with a "right to use" for the client. Fitting an entire app with my framework is almost trivial. Each form has to be opened and the form wrapper class loaded in OnOpen and torn down in OnClose. There were a couple of tables to drive the framework. TBH I have no idea how many lines of code. Far fewer than if I had duplicated all that code in each form. On Fri, Aug 28, 2020 at 10:42 AM Daniel Waters wrote: > Hi Mark, > > I?ve done the same myself. I?m curious what we each consider to be ?a > large Access application? how many lines of code are in it? The four I?ve > written were all between 50K and 80K LOC. > > MZ Tools has a quick LOC counting feature. > > Thanks! > Dan > > Sent from Mail for > Windows 10 > > From: Mark Simms via AccessD > Sent: Friday, August 28, 2020 7:53 AM > To: accessd at databaseadvisors.com > Cc: Mark Simms > Subject: Re: [AccessD] Classes and events > > I am supporting a large Access application that I wrote over 5 years ago. > My client tried to get quotes for replacing it, but they were over 1/2 > million dollars....so the app still stands. > > Mark Simms > marksimms at verizon.net > > -----Original Message----- > From: Bill Benson > To: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Sent: Fri, Aug 28, 2020 1:42 am > Subject: Re: [AccessD] Classes and events > > But just a note asking a question about ?out there? to people ?in here? may > not be the asking the right place. > > On Fri, Aug 28, 2020 at 1:40 AM Bill Benson > wrote: > > > Nope :( > > > > On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > > > >> I also uploaded a bunch of Access databases with examples of classes. I > >> > >> haven't opened access in a few years. Is anyone out there still actively > >> > >> developing i Access? > >> > >> > >> > >> > >> > >> -- > >> > >> John W. Colby > >> > >> Colby Consulting > >> > >> -- > >> > >> AccessD mailing list > >> > >> AccessD at databaseadvisors.com > >> > >> http://databaseadvisors.com/mailman/listinfo/accessd > >> > >> Website: http://www.databaseadvisors.com > >> > >> > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- John W. Colby Colby Consulting From jwcolby at gmail.com Fri Aug 28 14:29:29 2020 From: jwcolby at gmail.com (John Colby) Date: Fri, 28 Aug 2020 15:29:29 -0400 Subject: [AccessD] Classes and events - security framework Message-ID: About halfway through the design of the call center, we realized we needed to control editing of data. I had long used an Active / trash flag in every table so that records were not deleted, but rather set to inactive or trash (by the delete). This allowed undeleting by clearing the trash flag, and allowing records in forms to be "hidden" by the active flag being cleared. Only supervisors could get at these fields in the records. So for security I created a Groups / users / UsersGroup tables. The old switchboard form things so famous back in the day would force a login as it opened. Once the user was validated the security framework now knew the groups that user belonged to. We kept it somewhat simple with data entry, supervisor, managers etc. Forms could then set the visible and enabled properties to false for specific controls. If a user belonged to groups which allowed a given control to be visible, the control wrapper class would set the visible property true, unhiding an otherwise hidden control Likewise with enabled property. This handled the cases where given groups couldn't view (for example) salaries, or could view but not edit and so forth. As importantly, we wanted only certain groups to be able to open the edit forms in the OnClick of the combos and lists. Generally only supervisors could edit that data (who could do what). Thus a control could filter the OnClick to disallow a given user from opening the forms that allowed adding / editing / deleting data in tables behind combos and lists. This is all trivial to do if every control and every form automatically receives a wrapper class, and so can check and implement security rules. It was all table driven with specific forms able to be edited, opened and / or viewed by specific groups, iow a Form - group M-M table with edit / view fields. The key to it all of course is a framework where every object, every form, every control is "smart" because the framework makes it so. The security framework is of course also a set of classes loading the security data into lists as the app loads. Then the physical layer, the forms and controls can ask the security framework what is allowed as each form loads. -- John W. Colby Colby Consulting From fuller.artful at gmail.com Fri Aug 28 14:30:25 2020 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 28 Aug 2020 15:30:25 -0400 Subject: [AccessD] Classes and events In-Reply-To: References: <947714461.660542.1598618898223@mail.yahoo.com> Message-ID: Simple tools such as MA-Tools could analyse your code and at least count the lines, which is not to say that line-count is a measure of quality. You don'r need to worry about that, though. You have already proved your mettle. As to continuing Access development, I only work in this environment for quick sketches, then move either to C# or Python, mostly the latter. On Fri, Aug 28, 2020 at 2:36 PM John Colby wrote: > For me, the largest app I ever wrote in Access was a call center app for a > disability insurance processing company. It was about 180 tables by the > time I left. At least one form for each table. Sometimes two if I needed > a standalone data entry form and a subform for a given table. Plus > reports. > > The framework I discussed in a new post was instantiated once for the app, > and then each form would load a wrapper class for itself, whenever it > loaded with the control scanner, which would wrap every control in it's own > class. Automatic setup as a form loads, and teardown as a form closes. > > My framework was where most of the code lived for the app. Only the > case of "one off" functionality specific to the business rules of the app > would live inside of modules or classes in the app itself. The framework > was a library. I had an agreement that the framework belonged to me, with > a "right to use" for the client. Fitting an entire app with my framework > is almost trivial. Each form has to be opened and the form wrapper class > loaded in OnOpen and torn down in OnClose. There were a couple of tables > to drive the framework. > > TBH I have no idea how many lines of code. Far fewer than if I had > duplicated all that code in each form. > > On Fri, Aug 28, 2020 at 10:42 AM Daniel Waters > wrote: > > > Hi Mark, > > > > I?ve done the same myself. I?m curious what we each consider to be ?a > > large Access application? how many lines of code are in it? The four > I?ve > > written were all between 50K and 80K LOC. > > > > MZ Tools has a quick LOC counting feature. > > > > Thanks! > > Dan > > > > Sent from Mail for > > Windows 10 > > > > From: Mark Simms via AccessD > > Sent: Friday, August 28, 2020 7:53 AM > > To: accessd at databaseadvisors.com > > Cc: Mark Simms > > Subject: Re: [AccessD] Classes and events > > > > I am supporting a large Access application that I wrote over 5 years ago. > > My client tried to get quotes for replacing it, but they were over 1/2 > > million dollars....so the app still stands. > > > > Mark Simms > > marksimms at verizon.net > > > > -----Original Message----- > > From: Bill Benson > > To: Access Developers discussion and problem solving < > > accessd at databaseadvisors.com> > > Sent: Fri, Aug 28, 2020 1:42 am > > Subject: Re: [AccessD] Classes and events > > > > But just a note asking a question about ?out there? to people ?in here? > may > > not be the asking the right place. > > > > On Fri, Aug 28, 2020 at 1:40 AM Bill Benson > > wrote: > > > > > Nope :( > > > > > > On Thu, Aug 27, 2020 at 12:02 PM John Colby wrote: > > > > > >> I also uploaded a bunch of Access databases with examples of > classes. I > > >> > > >> haven't opened access in a few years. Is anyone out there still > actively > > >> > > >> developing i Access? > > >> > > >> > > >> > > >> > > >> > > >> -- > > >> > > >> John W. Colby > > >> > > >> Colby Consulting > > >> > > >> -- > > >> > > >> AccessD mailing list > > >> > > >> AccessD at databaseadvisors.com > > >> > > >> http://databaseadvisors.com/mailman/listinfo/accessd > > >> > > >> Website: http://www.databaseadvisors.com > > >> > > >> > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Arthur From jwcolby at gmail.com Fri Aug 28 16:55:49 2020 From: jwcolby at gmail.com (John Colby) Date: Fri, 28 Aug 2020 17:55:49 -0400 Subject: [AccessD] Classes and events In-Reply-To: References: <947714461.660542.1598618898223@mail.yahoo.com> Message-ID: I love python but I am not enamored with the gui generating side of things. Access has a beautifully structured control set for building forms and raising / hooking events. On Fri, Aug 28, 2020, 15:31 Arthur Fuller wrote: > Simple tools such as MA-Tools could analyse your code and at least count > the lines, which is not to say that line-count is a measure of quality. You > don'r need to worry about that, though. You have already proved your > mettle. > As to continuing Access development, I only work in this environment for > quick sketches, then move either to C# or Python, mostly the latter. > > On Fri, Aug 28, 2020 at 2:36 PM John Colby wrote: > > > For me, the largest app I ever wrote in Access was a call center app for > a > > disability insurance processing company. It was about 180 tables by the > > time I left. At least one form for each table. Sometimes two if I > needed > > a standalone data entry form and a subform for a given table. Plus > > reports. > > > > The framework I discussed in a new post was instantiated once for the > app, > > and then each form would load a wrapper class for itself, whenever it > > loaded with the control scanner, which would wrap every control in it's > own > > class. Automatic setup as a form loads, and teardown as a form closes. > > > > My framework was where most of the code lived for the app. Only the > > case of "one off" functionality specific to the business rules of the app > > would live inside of modules or classes in the app itself. The framework > > was a library. I had an agreement that the framework belonged to me, > with > > a "right to use" for the client. Fitting an entire app with my framework > > is almost trivial. Each form has to be opened and the form wrapper class > > loaded in OnOpen and torn down in OnClose. There were a couple of tables > > to drive the framework. > > > > TBH I have no idea how many lines of code. Far fewer than if I had > > duplicated all that code in each form. > > > > On Fri, Aug 28, 2020 at 10:42 AM Daniel Waters > > wrote: > > > > > Hi Mark, > > > > > > I?ve done the same myself. I?m curious what we each consider to be ?a > > > large Access application? how many lines of code are in it? The four > > I?ve > > > written were all between 50K and 80K LOC. > > > > > > MZ Tools has a quick LOC counting feature. > > > > > > Thanks! > > > Dan > > > > > > Sent from Mail for > > > Windows 10 > > > > > > From: Mark Simms via AccessD > > > Sent: Friday, August 28, 2020 7:53 AM > > > To: accessd at databaseadvisors.com > > > Cc: Mark Simms > > > Subject: Re: [AccessD] Classes and events > > > > > > I am supporting a large Access application that I wrote over 5 years > ago. > > > My client tried to get quotes for replacing it, but they were over 1/2 > > > million dollars....so the app still stands. > > > > > > Mark Simms > > > marksimms at verizon.net > > > > > > -----Original Message----- > > > From: Bill Benson > > > To: Access Developers discussion and problem solving < > > > accessd at databaseadvisors.com> > > > Sent: Fri, Aug 28, 2020 1:42 am > > > Subject: Re: [AccessD] Classes and events > > > > > > But just a note asking a question about ?out there? to people ?in here? > > may > > > not be the asking the right place. > > > > > > On Fri, Aug 28, 2020 at 1:40 AM Bill Benson > > > wrote: > > > > > > > Nope :( > > > > > > > > On Thu, Aug 27, 2020 at 12:02 PM John Colby > wrote: > > > > > > > >> I also uploaded a bunch of Access databases with examples of > > classes. I > > > >> > > > >> haven't opened access in a few years. Is anyone out there still > > actively > > > >> > > > >> developing i Access? > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> -- > > > >> > > > >> John W. Colby > > > >> > > > >> Colby Consulting > > > >> > > > >> -- > > > >> > > > >> AccessD mailing list > > > >> > > > >> AccessD at databaseadvisors.com > > > >> > > > >> http://databaseadvisors.com/mailman/listinfo/accessd > > > >> > > > >> Website: http://www.databaseadvisors.com > > > >> > > > >> > > > > > > > > > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > > > > -- > > John W. Colby > > Colby Consulting > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > Arthur > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From tinanfields at torchlake.com Sat Aug 29 08:11:43 2020 From: tinanfields at torchlake.com (Tina N Fields) Date: Sat, 29 Aug 2020 09:11:43 -0400 Subject: [AccessD] Classes and events In-Reply-To: References: Message-ID: Yes, a couple new projects, and a few old ones for maintenance. Still do love the program. T Tina Norris Fields 231-322-2787 tinanfields-at-torchlake-dot-com On 8/27/2020 12:01 PM, John Colby wrote: > I also uploaded a bunch of Access databases with examples of classes. I > haven't opened access in a few years. Is anyone out there still actively > developing i Access? > > From charlotte.foust at gmail.com Sat Aug 29 18:09:58 2020 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 29 Aug 2020 16:09:58 -0700 Subject: [AccessD] Classes and withevents In-Reply-To: References: Message-ID: I used them in the same way, John. Maybe someone will pick up something useful from your code. Charlotte Foust (916) 206-4336 On Fri, Aug 28, 2020 at 11:19 AM John Colby wrote: > As for me, I discovered classes about midway through my career in Access. > They do not have inheritance, but they do provide encapsulation of code nd > data and they can sink events from any Access object that raises events, > and can themselves raise events. Everything in Access is a class. Every > control, every form, every recordset everything. All controls and the > forms raise events. > > Yes you can hook the events in the form's class via the form's property > sheet but that is truly kludgy. Essentially the form's class is now tasked > with being an event sink for control objects. If you have one or a dozen > combo boxes and you want to hook the events, all those event sinks are held > in the form's class. OnEnter, OnExit, OnClick, etc etc, event sinks for > non-form objects sunk in a form class. > > I discovered how to make what I called "wrapper classes", i.e. classes > which "wrap" an object like a text box, a list, box, a combo box, a radio > button etc. You name it, I had a wrapper class for that control. I > actually wrote a form class which would scan the form as it instantiated > looking for controls, and when found I would "wrap" the control in it's own > class. These classes then had event sinks for every control event that I > cared to handle. So if there were (for example) a dozen text boxes, the > control scanner would find each text box, instantiated a text vox class, > pass in the pointer to that specific text box, and save it "withevents" in > the header of the class. At that point, that class could sink any and all > events for that one text box. > > I would then store every control class created by the form class' control > scanner code in the form "wrapper class" which had a collection to store > pointers to the control classes. > > Given this framework, instantiating a form wrapper class would find and > initialize all controls on any form. Voila, done. It would likewise tear > it all down when the form closed. > > I used this for things like... > > In a form, I wanted a standard back ground color for controls. But how do > you inform the user which control has the focus? You sink the OnEnter > andGotFocus events in the control's wrapper class. As a control gets the > focus, the event is sunk in the wrapper class, which then stores the > current color, and changes the background color to something else. > Whatever control has the focus now "automatically" changes color as it gets > the focus (or onEnter) and switches the color bask as it loses focus (or > onExit). All automatically. The code is written once when I designed the > wrapper class, and now it "just works", every time, every where, every > form, every control on every form. > > Another example. I wanted combos to be able to open a form to edit the > data displayed in the combo. If the combo is loaded from a table, then a > Double click would open a form to allow the user to add, edit, or delete > the data in that table. When that form closed, the combo needs to requery > itself. How do you do that you ask? > > The combo "wrapper class" has all the code to do that. The onClick event > discovers which table the data is coming from and opens the form for > editing that table. As the edit form closes, the combo wrapper class > requeries the combo. All automatically, every time, every where. Class > wrapper code written once, then it "just works" Every combo is discovered > by the form clss' Control scanner and "wrapped" in a class which handles > all that. As well as the aforementioned background color stuff. > > Classes, and event sinks for controls are waaaay powerful stuff. Nope, I > couldn't inherit the control, but I could "wrap" the control in a class > which sank it's events and performed whatever processing, whatever behavior > I, the UI interface designer decides was useful. > > And that stuff is what is contained in the examples I pushed to GIt. > > On Fri, Aug 28, 2020 at 12:41 PM Charlotte Foust < > charlotte.foust at gmail.com> > wrote: > > > When I was active, I used classes and withevents in pretty much every > > application. Now I'm involuntarily retired, but I think a lot of newer > > developers never learn the power of classes. There was also always the > > downside that an error could break the entire application and leave a > user > > frozen in place. For those of us who liked pushing Access to its limits, > > classes were great! > > > > Charlotte Foust > > (916) 206-4336 > > > > > > On Fri, Aug 28, 2020 at 6:50 AM John Colby wrote: > > > > > Of those still doing access development, do you you use classes and if > so > > > how? > > > > > > Do you use event sinking and sourcing in classes and if so how? > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at gmail.com Sat Aug 29 22:17:03 2020 From: jwcolby at gmail.com (John Colby) Date: Sat, 29 Aug 2020 23:17:03 -0400 Subject: [AccessD] Classes and withevents In-Reply-To: References: Message-ID: I'm in an interesting position. I developed my framework largely during the development of the Disability Insurance call center software. Before that I really didn't "get" classes and so I used collections of collections to do some of the stuff I later did with classes. Very crude. At any rate I retrofitted my billing app to use the framework as I switched to hard core class / events. At the end I had a client for whom I was doing SQL Server stuff. I literally built the servers from parts and they were quite powerful for the times - 16 cores on two cpu chips, 90 gigs of ram, raid6 etc. So I ported my billing database to live on that server. In the end the server lived in a hosting site in NY and I lived in NC. But the billing app was quite happy to work across the internet, Well... that business eventually died and I got the servers back. They are turned off in the other room. So my latest billing data and "back end" sit on a turned off server in my spare bedroom, on what is now "dated" hardware. If I want to resurrect my billing database I need to turn the server back on, back up my billing database, get a sql server running on my laptop and make it serve my billing BE. Worth doing I suppose but a lot of work. As for errors locking up the app, Shamil taught me this stuff. He largely abandoned trying to make it work because of the problems he ran into. I believe that MS got the kinks worked out. I did not run into any such issues, although it is critical to understand how to instantiate, and equally importantly, tear down the classes consistently and reliably. I believe a lot of the early problems were events being hooked and never released. Access' garbage collector only collects the garbage once the last pointer to objects are removed. I learned to rigorously perform teardown in the parent class' OnClose. Any pointers to objects are released there. And I pushed this stuff way beyond what anyone other than perhaps yourself ever did. In the end my call center app worked very smoothly. Classes allow the developer to build a consistent interface that works the same way everywhere, one place to fix a given bug, all those benes we understand so well. You and I should start a school. If Access is going to refuse to die, the least we can do is support its OOP. :~) On Sat, Aug 29, 2020 at 7:10 PM Charlotte Foust wrote: > I used them in the same way, John. Maybe someone will pick up something > useful from your code. > > Charlotte Foust > (916) 206-4336 > > > On Fri, Aug 28, 2020 at 11:19 AM John Colby wrote: > > > As for me, I discovered classes about midway through my career in Access. > > They do not have inheritance, but they do provide encapsulation of code > nd > > data and they can sink events from any Access object that raises events, > > and can themselves raise events. Everything in Access is a class. Every > > control, every form, every recordset everything. All controls and the > > forms raise events. > > > > Yes you can hook the events in the form's class via the form's property > > sheet but that is truly kludgy. Essentially the form's class is now > tasked > > with being an event sink for control objects. If you have one or a dozen > > combo boxes and you want to hook the events, all those event sinks are > held > > in the form's class. OnEnter, OnExit, OnClick, etc etc, event sinks for > > non-form objects sunk in a form class. > > > > I discovered how to make what I called "wrapper classes", i.e. classes > > which "wrap" an object like a text box, a list, box, a combo box, a > radio > > button etc. You name it, I had a wrapper class for that control. I > > actually wrote a form class which would scan the form as it instantiated > > looking for controls, and when found I would "wrap" the control in it's > own > > class. These classes then had event sinks for every control event that I > > cared to handle. So if there were (for example) a dozen text boxes, the > > control scanner would find each text box, instantiated a text vox class, > > pass in the pointer to that specific text box, and save it "withevents" > in > > the header of the class. At that point, that class could sink any and > all > > events for that one text box. > > > > I would then store every control class created by the form class' control > > scanner code in the form "wrapper class" which had a collection to store > > pointers to the control classes. > > > > Given this framework, instantiating a form wrapper class would find and > > initialize all controls on any form. Voila, done. It would likewise > tear > > it all down when the form closed. > > > > I used this for things like... > > > > In a form, I wanted a standard back ground color for controls. But how > do > > you inform the user which control has the focus? You sink the OnEnter > > andGotFocus events in the control's wrapper class. As a control gets the > > focus, the event is sunk in the wrapper class, which then stores the > > current color, and changes the background color to something else. > > Whatever control has the focus now "automatically" changes color as it > gets > > the focus (or onEnter) and switches the color bask as it loses focus (or > > onExit). All automatically. The code is written once when I designed > the > > wrapper class, and now it "just works", every time, every where, every > > form, every control on every form. > > > > Another example. I wanted combos to be able to open a form to edit the > > data displayed in the combo. If the combo is loaded from a table, then a > > Double click would open a form to allow the user to add, edit, or delete > > the data in that table. When that form closed, the combo needs to > requery > > itself. How do you do that you ask? > > > > The combo "wrapper class" has all the code to do that. The onClick event > > discovers which table the data is coming from and opens the form for > > editing that table. As the edit form closes, the combo wrapper class > > requeries the combo. All automatically, every time, every where. Class > > wrapper code written once, then it "just works" Every combo is > discovered > > by the form clss' Control scanner and "wrapped" in a class which handles > > all that. As well as the aforementioned background color stuff. > > > > Classes, and event sinks for controls are waaaay powerful stuff. Nope, I > > couldn't inherit the control, but I could "wrap" the control in a class > > which sank it's events and performed whatever processing, whatever > behavior > > I, the UI interface designer decides was useful. > > > > And that stuff is what is contained in the examples I pushed to GIt. > > > > On Fri, Aug 28, 2020 at 12:41 PM Charlotte Foust < > > charlotte.foust at gmail.com> > > wrote: > > > > > When I was active, I used classes and withevents in pretty much every > > > application. Now I'm involuntarily retired, but I think a lot of newer > > > developers never learn the power of classes. There was also always the > > > downside that an error could break the entire application and leave a > > user > > > frozen in place. For those of us who liked pushing Access to its > limits, > > > classes were great! > > > > > > Charlotte Foust > > > (916) 206-4336 > > > > > > > > > On Fri, Aug 28, 2020 at 6:50 AM John Colby wrote: > > > > > > > Of those still doing access development, do you you use classes and > if > > so > > > > how? > > > > > > > > Do you use event sinking and sourcing in classes and if so how? > > > > -- > > > > AccessD mailing list > > > > AccessD at databaseadvisors.com > > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > > Website: http://www.databaseadvisors.com > > > > > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > > > > -- > > John W. Colby > > Colby Consulting > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- John W. Colby Colby Consulting From jimdettman at verizon.net Sun Aug 30 11:48:13 2020 From: jimdettman at verizon.net (Jim Dettman) Date: Sun, 30 Aug 2020 12:48:13 -0400 Subject: [AccessD] Classes and withevents In-Reply-To: References: Message-ID: <039801d67eed$5a3ec3a0$0ebc4ae0$@verizon.net> << As for errors locking up the app, Shamil taught me this stuff. He largely abandoned trying to make it work because of the problems he ran into. I believe that MS got the kinks worked out. >> FWIW, I would not count on that. There has been very little work done with classes in Access. Yes, I know forms and reports in Access are classes, but that's a very different thing from using classes in VBA. VBA itself has gotten very little love from Microsoft for a very long time now and it's highly doubtful it would moving forward. It's just not where their focus is. Even to this day there remains a number of long-standing issues that they show no signs or interest in fixing. Of course there are practices you can follow to minimize internal bugs with Access/VBA (i.e. closing objects, setting things to nothing, being fully explicit, etc), but don't expect anything that's been there before to work any differently, and there is a high probability that you could run into something that would not be fixed. Like I said, FWIW. Jim. -----Original Message----- From: AccessD On Behalf Of John Colby Sent: Saturday, August 29, 2020 11:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Classes and withevents I'm in an interesting position. I developed my framework largely during the development of the Disability Insurance call center software. Before that I really didn't "get" classes and so I used collections of collections to do some of the stuff I later did with classes. Very crude. At any rate I retrofitted my billing app to use the framework as I switched to hard core class / events. At the end I had a client for whom I was doing SQL Server stuff. I literally built the servers from parts and they were quite powerful for the times - 16 cores on two cpu chips, 90 gigs of ram, raid6 etc. So I ported my billing database to live on that server. In the end the server lived in a hosting site in NY and I lived in NC. But the billing app was quite happy to work across the internet, Well... that business eventually died and I got the servers back. They are turned off in the other room. So my latest billing data and "back end" sit on a turned off server in my spare bedroom, on what is now "dated" hardware. If I want to resurrect my billing database I need to turn the server back on, back up my billing database, get a sql server running on my laptop and make it serve my billing BE. Worth doing I suppose but a lot of work. As for errors locking up the app, Shamil taught me this stuff. He largely abandoned trying to make it work because of the problems he ran into. I believe that MS got the kinks worked out. I did not run into any such issues, although it is critical to understand how to instantiate, and equally importantly, tear down the classes consistently and reliably. I believe a lot of the early problems were events being hooked and never released. Access' garbage collector only collects the garbage once the last pointer to objects are removed. I learned to rigorously perform teardown in the parent class' OnClose. Any pointers to objects are released there. And I pushed this stuff way beyond what anyone other than perhaps yourself ever did. In the end my call center app worked very smoothly. Classes allow the developer to build a consistent interface that works the same way everywhere, one place to fix a given bug, all those benes we understand so well. You and I should start a school. If Access is going to refuse to die, the least we can do is support its OOP. :~) On Sat, Aug 29, 2020 at 7:10 PM Charlotte Foust wrote: > I used them in the same way, John. Maybe someone will pick up something > useful from your code. > > Charlotte Foust > (916) 206-4336 > > > On Fri, Aug 28, 2020 at 11:19 AM John Colby wrote: > > > As for me, I discovered classes about midway through my career in Access. > > They do not have inheritance, but they do provide encapsulation of code > nd > > data and they can sink events from any Access object that raises events, > > and can themselves raise events. Everything in Access is a class. Every > > control, every form, every recordset everything. All controls and the > > forms raise events. > > > > Yes you can hook the events in the form's class via the form's property > > sheet but that is truly kludgy. Essentially the form's class is now > tasked > > with being an event sink for control objects. If you have one or a dozen > > combo boxes and you want to hook the events, all those event sinks are > held > > in the form's class. OnEnter, OnExit, OnClick, etc etc, event sinks for > > non-form objects sunk in a form class. > > > > I discovered how to make what I called "wrapper classes", i.e. classes > > which "wrap" an object like a text box, a list, box, a combo box, a > radio > > button etc. You name it, I had a wrapper class for that control. I > > actually wrote a form class which would scan the form as it instantiated > > looking for controls, and when found I would "wrap" the control in it's > own > > class. These classes then had event sinks for every control event that I > > cared to handle. So if there were (for example) a dozen text boxes, the > > control scanner would find each text box, instantiated a text vox class, > > pass in the pointer to that specific text box, and save it "withevents" > in > > the header of the class. At that point, that class could sink any and > all > > events for that one text box. > > > > I would then store every control class created by the form class' control > > scanner code in the form "wrapper class" which had a collection to store > > pointers to the control classes. > > > > Given this framework, instantiating a form wrapper class would find and > > initialize all controls on any form. Voila, done. It would likewise > tear > > it all down when the form closed. > > > > I used this for things like... > > > > In a form, I wanted a standard back ground color for controls. But how > do > > you inform the user which control has the focus? You sink the OnEnter > > andGotFocus events in the control's wrapper class. As a control gets the > > focus, the event is sunk in the wrapper class, which then stores the > > current color, and changes the background color to something else. > > Whatever control has the focus now "automatically" changes color as it > gets > > the focus (or onEnter) and switches the color bask as it loses focus (or > > onExit). All automatically. The code is written once when I designed > the > > wrapper class, and now it "just works", every time, every where, every > > form, every control on every form. > > > > Another example. I wanted combos to be able to open a form to edit the > > data displayed in the combo. If the combo is loaded from a table, then a > > Double click would open a form to allow the user to add, edit, or delete > > the data in that table. When that form closed, the combo needs to > requery > > itself. How do you do that you ask? > > > > The combo "wrapper class" has all the code to do that. The onClick event > > discovers which table the data is coming from and opens the form for > > editing that table. As the edit form closes, the combo wrapper class > > requeries the combo. All automatically, every time, every where. Class > > wrapper code written once, then it "just works" Every combo is > discovered > > by the form clss' Control scanner and "wrapped" in a class which handles > > all that. As well as the aforementioned background color stuff. > > > > Classes, and event sinks for controls are waaaay powerful stuff. Nope, I > > couldn't inherit the control, but I could "wrap" the control in a class > > which sank it's events and performed whatever processing, whatever > behavior > > I, the UI interface designer decides was useful. > > > > And that stuff is what is contained in the examples I pushed to GIt. > > > > On Fri, Aug 28, 2020 at 12:41 PM Charlotte Foust < > > charlotte.foust at gmail.com> > > wrote: > > > > > When I was active, I used classes and withevents in pretty much every > > > application. Now I'm involuntarily retired, but I think a lot of newer > > > developers never learn the power of classes. There was also always the > > > downside that an error could break the entire application and leave a > > user > > > frozen in place. For those of us who liked pushing Access to its > limits, > > > classes were great! > > > > > > Charlotte Foust > > > (916) 206-4336 > > > > > > > > > On Fri, Aug 28, 2020 at 6:50 AM John Colby wrote: > > > > > > > Of those still doing access development, do you you use classes and > if > > so > > > > how? > > > > > > > > Do you use event sinking and sourcing in classes and if so how? > > > > -- > > > > AccessD mailing list > > > > AccessD at databaseadvisors.com > > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > > Website: http://www.databaseadvisors.com > > > > > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > > > > -- > > John W. Colby > > Colby Consulting > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- John W. Colby Colby Consulting -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at gmail.com Sun Aug 30 12:34:00 2020 From: jwcolby at gmail.com (John Colby) Date: Sun, 30 Aug 2020 13:34:00 -0400 Subject: [AccessD] Classes and Withevents Message-ID: Jim, you have to understand that in the framework and app I wrote I would instantiate literally thousands of wrapper classes, sink events in those classes, tear them back down etc. Thousands every single day for every single user. And I didn't have issues. Shamile got out long before the last two service packs were issued. I quite understand that Microsoft isn't actively doing anything with it. Any remaining bugs will never be fixed. Yep, got it. On the other hand by 2005 or whenever SP3 came out, Access was 15 years old and they had been working on it up to that time. It is my opinion that it is remarkably stable. It is also my opinion that there is no other DB FE RAD in existence even close to it in pure data integration and OO integration. It is a remarkable piece of engineering IMHO. Maybe I should offer MS a dollar to sell it to me? :) >>>There has been very little work done with classes in Access. Yes, I know forms and reports in Access are classes, but that's a very different thing from using classes in VBA. As for the classes, AFAIK the classes behind reports and forms are the exact same thing as the classes that you can use if you so desire. And to say that little work has been done with them ignores the fact that everything in Access is a class. All the controls come from a base control class. The DAO engine and everything in it is a class, AFAICT even the properties of objects are classes. All the controls, forms and reports know how to raise events. All classes can sink events. And they can sink events from ANYTHING passed in to them that is saved "WithEvents". Every Access developer who uses event sinks in a form or report class for handling the events from controls is already sinking events. It is a miniscule jump to opening your own class, passing in an object (control for instance), storing a pointer to that "WithEvents" in the header of that class, and then sinking events from that control inside of the class you just created. Trivial. And... the class itself can raise its own events. And, any class can take a pointer to another class, store a pointer to that passed in class "withevents" and sink the events from that class. And... anything that can raise events can be saved in multiple locations and the events sunk in every class where a pointer to the object is stored "WithEvents". So a combo GotFocus event can be sunk in one or a thousand different classes. Pass a pointer to a combo into a function in the class behind form of 10 other forms, save a pointer to that combo "WithEvents" in the header of that class, and each of those forms can sink the events from that combo. And... There are controls at the top of the class which display any objects saved "WithEvents" in the top of the class, as well as all of the events of said object. Selecting such an object and an event will stub out the event sink for you. And... all this stuff ALSO works in Excel, Word, Power Point and so forth. This is precisely the same technology that C# provides. The syntax for doing it is different of course but the capability is there. It is just that the "average programmer" in Access vba has no clue. But I have a clue. Access is, from top to bottom, an object oriented design. At the risk of repeating myself, It is a remarkable piece of engineering IMHO. -- John W. Colby Colby Consulting From charlotte.foust at gmail.com Sun Aug 30 13:36:05 2020 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 30 Aug 2020 11:36:05 -0700 Subject: [AccessD] Classes and Withevents In-Reply-To: References: Message-ID: John, I have to agree with you. Once I found classes in Access, I had a lot of fun putting them to use. The error handling had to be resilient, and they were problematic when supervisors couldn't understand them or had bought into the argument that Access didn't use them reliably. Other than that, I had superclasses and subclasses and they worked well. Charlotte Foust (916) 206-4336 On Sun, Aug 30, 2020 at 10:34 AM John Colby wrote: > Jim, you have to understand that in the framework and app I wrote I would > instantiate literally thousands of wrapper classes, sink events in those > classes, tear them back down etc. Thousands every single day for every > single user. And I didn't have issues. Shamile got out long before the > last two service packs were issued. > > I quite understand that Microsoft isn't actively doing anything with it. > Any remaining bugs will never be fixed. Yep, got it. On the other hand by > 2005 or whenever SP3 came out, Access was 15 years old and they had been > working on it up to that time. It is my opinion that it is remarkably > stable. It is also my opinion that there is no other DB FE RAD in > existence even close to it in pure data integration and OO integration. It > is a remarkable piece of engineering IMHO. > > Maybe I should offer MS a dollar to sell it to me? :) > > >>>There has been very little work done with classes in Access. Yes, I > know forms and reports in Access are classes, but that's a very different > thing from using classes in VBA. > > As for the classes, AFAIK the classes behind reports and forms are the > exact same thing as the classes that you can use if you so desire. And to > say that little work has been done with them ignores the fact that > everything in Access is a class. All the controls come from a base control > class. The DAO engine and everything in it is a class, AFAICT even the > properties of objects are classes. All the controls, forms and reports > know how to raise events. > > All classes can sink events. And they can sink events from ANYTHING passed > in to them that is saved "WithEvents". Every Access developer who uses > event sinks in a form or report class for handling the events from controls > is already sinking events. It is a miniscule jump to opening your own > class, passing in an object (control for instance), storing a pointer to > that "WithEvents" in the header of that class, and then sinking events from > that control inside of the class you just created. Trivial. > > And... the class itself can raise its own events. And, any class can take > a pointer to another class, store a pointer to that passed in class > "withevents" and sink the events from that class. And... anything that can > raise events can be saved in multiple locations and the events sunk in > every class where a pointer to the object is stored "WithEvents". So a > combo GotFocus event can be sunk in one or a thousand different classes. > Pass a pointer to a combo into a function in the class behind form of 10 > other forms, save a pointer to that combo "WithEvents" in the header of > that class, and each of those forms can sink the events from that combo. > > And... There are controls at the top of the class which display any objects > saved "WithEvents" in the top of the class, as well as all of the events of > said object. Selecting such an object and an event will stub out the event > sink for you. > > And... all this stuff ALSO works in Excel, Word, Power Point and so forth. > > This is precisely the same technology that C# provides. The syntax for > doing it is different of course but the capability is there. It is just > that the "average programmer" in Access vba has no clue. But I have a clue. > > Access is, from top to bottom, an object oriented design. At the risk of > repeating myself, It is a remarkable piece of engineering IMHO. > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jimdettman at verizon.net Sun Aug 30 15:50:02 2020 From: jimdettman at verizon.net (Jim Dettman) Date: Sun, 30 Aug 2020 16:50:02 -0400 Subject: [AccessD] Classes and Withevents In-Reply-To: References: Message-ID: <001801d67f0f$224c21a0$66e464e0$@verizon.net> John, You are preaching to the choir so to speak. I know what classes are, how to use them, and use them all the time when doing C# or VFP. But when it comes to Access, lacking full inheritance, I just don't find them overly useful or worth the overhead for the most part, and this is a conversation we've had several times in the past that I don't care to repeat. All I was offering was that since you've been out of Access for a while, was letting you know that nothing fundamentally has changed, so if there were issues you were running into, expect them still to exist. In fact, recently the stability of Access has gotten worse. Microsoft has introduced more than a few killer bugs over the past couple of years, one of which is now over two years old and a fix nowhere in sight. To be fair, it's the Windows group that introduced the bug, but we're still left to deal with it. The other part was that even to this day, classes are still not widely used in Access and I would not be shocked if you ran into new issues. A lot has happened with Access since you stopped using it. As I said, FWIW. Jim. -----Original Message----- From: AccessD On Behalf Of John Colby Sent: Sunday, August 30, 2020 1:34 PM To: Access Developers discussion and problem solving Subject: [AccessD] Classes and Withevents Jim, you have to understand that in the framework and app I wrote I would instantiate literally thousands of wrapper classes, sink events in those classes, tear them back down etc. Thousands every single day for every single user. And I didn't have issues. Shamile got out long before the last two service packs were issued. I quite understand that Microsoft isn't actively doing anything with it. Any remaining bugs will never be fixed. Yep, got it. On the other hand by 2005 or whenever SP3 came out, Access was 15 years old and they had been working on it up to that time. It is my opinion that it is remarkably stable. It is also my opinion that there is no other DB FE RAD in existence even close to it in pure data integration and OO integration. It is a remarkable piece of engineering IMHO. Maybe I should offer MS a dollar to sell it to me? :) >>>There has been very little work done with classes in Access. Yes, I know forms and reports in Access are classes, but that's a very different thing from using classes in VBA. As for the classes, AFAIK the classes behind reports and forms are the exact same thing as the classes that you can use if you so desire. And to say that little work has been done with them ignores the fact that everything in Access is a class. All the controls come from a base control class. The DAO engine and everything in it is a class, AFAICT even the properties of objects are classes. All the controls, forms and reports know how to raise events. All classes can sink events. And they can sink events from ANYTHING passed in to them that is saved "WithEvents". Every Access developer who uses event sinks in a form or report class for handling the events from controls is already sinking events. It is a miniscule jump to opening your own class, passing in an object (control for instance), storing a pointer to that "WithEvents" in the header of that class, and then sinking events from that control inside of the class you just created. Trivial. And... the class itself can raise its own events. And, any class can take a pointer to another class, store a pointer to that passed in class "withevents" and sink the events from that class. And... anything that can raise events can be saved in multiple locations and the events sunk in every class where a pointer to the object is stored "WithEvents". So a combo GotFocus event can be sunk in one or a thousand different classes. Pass a pointer to a combo into a function in the class behind form of 10 other forms, save a pointer to that combo "WithEvents" in the header of that class, and each of those forms can sink the events from that combo. And... There are controls at the top of the class which display any objects saved "WithEvents" in the top of the class, as well as all of the events of said object. Selecting such an object and an event will stub out the event sink for you. And... all this stuff ALSO works in Excel, Word, Power Point and so forth. This is precisely the same technology that C# provides. The syntax for doing it is different of course but the capability is there. It is just that the "average programmer" in Access vba has no clue. But I have a clue. Access is, from top to bottom, an object oriented design. At the risk of repeating myself, It is a remarkable piece of engineering IMHO. -- John W. Colby Colby Consulting -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at gmail.com Mon Aug 31 00:32:30 2020 From: jwcolby at gmail.com (John Colby) Date: Mon, 31 Aug 2020 01:32:30 -0400 Subject: [AccessD] Classes and Withevents In-Reply-To: <001801d67f0f$224c21a0$66e464e0$@verizon.net> References: <001801d67f0f$224c21a0$66e464e0$@verizon.net> Message-ID: I find it amusing that a progmmer says I don't use classes because they are not inheritable and then happily uses combos, text boxes, forms, reports, recordsets etc which are all classes and are not inheritable. An access class is every bit as powerful and useful as any other class in access, and are a paradigm shift once used. So no, I obviously am not preaching to the choir. On Sun, Aug 30, 2020, 16:50 Jim Dettman via AccessD < accessd at databaseadvisors.com> wrote: > John, > > You are preaching to the choir so to speak. > > I know what classes are, how to use them, and use them all the time when > doing C# or VFP. > > But when it comes to Access, lacking full inheritance, I just don't find > them overly useful or worth the overhead for the most part, and this is a > conversation we've had several times in the past that I don't care to > repeat. > > All I was offering was that since you've been out of Access for a while, > was letting you know that nothing fundamentally has changed, so if there > were issues you were running into, expect them still to exist. In fact, > recently the stability of Access has gotten worse. Microsoft has > introduced > more than a few killer bugs over the past couple of years, one of which is > now over two years old and a fix nowhere in sight. To be fair, it's the > Windows group that introduced the bug, but we're still left to deal with > it. > > The other part was that even to this day, classes are still not widely > used > in Access and I would not be shocked if you ran into new issues. A lot has > happened with Access since you stopped using it. > > As I said, FWIW. > > Jim. > > > -----Original Message----- > From: AccessD On Behalf Of John Colby > Sent: Sunday, August 30, 2020 1:34 PM > To: Access Developers discussion and problem solving > > Subject: [AccessD] Classes and Withevents > > Jim, you have to understand that in the framework and app I wrote I would > instantiate literally thousands of wrapper classes, sink events in those > classes, tear them back down etc. Thousands every single day for every > single user. And I didn't have issues. Shamile got out long before the > last two service packs were issued. > > I quite understand that Microsoft isn't actively doing anything with it. > Any remaining bugs will never be fixed. Yep, got it. On the other hand by > 2005 or whenever SP3 came out, Access was 15 years old and they had been > working on it up to that time. It is my opinion that it is remarkably > stable. It is also my opinion that there is no other DB FE RAD in > existence even close to it in pure data integration and OO integration. It > is a remarkable piece of engineering IMHO. > > Maybe I should offer MS a dollar to sell it to me? :) > > >>>There has been very little work done with classes in Access. Yes, I > know forms and reports in Access are classes, but that's a very different > thing from using classes in VBA. > > As for the classes, AFAIK the classes behind reports and forms are the > exact same thing as the classes that you can use if you so desire. And to > say that little work has been done with them ignores the fact that > everything in Access is a class. All the controls come from a base control > class. The DAO engine and everything in it is a class, AFAICT even the > properties of objects are classes. All the controls, forms and reports > know how to raise events. > > All classes can sink events. And they can sink events from ANYTHING passed > in to them that is saved "WithEvents". Every Access developer who uses > event sinks in a form or report class for handling the events from controls > is already sinking events. It is a miniscule jump to opening your own > class, passing in an object (control for instance), storing a pointer to > that "WithEvents" in the header of that class, and then sinking events from > that control inside of the class you just created. Trivial. > > And... the class itself can raise its own events. And, any class can take > a pointer to another class, store a pointer to that passed in class > "withevents" and sink the events from that class. And... anything that can > raise events can be saved in multiple locations and the events sunk in > every class where a pointer to the object is stored "WithEvents". So a > combo GotFocus event can be sunk in one or a thousand different classes. > Pass a pointer to a combo into a function in the class behind form of 10 > other forms, save a pointer to that combo "WithEvents" in the header of > that class, and each of those forms can sink the events from that combo. > > And... There are controls at the top of the class which display any objects > saved "WithEvents" in the top of the class, as well as all of the events of > said object. Selecting such an object and an event will stub out the event > sink for you. > > And... all this stuff ALSO works in Excel, Word, Power Point and so forth. > > This is precisely the same technology that C# provides. The syntax for > doing it is different of course but the capability is there. It is just > that the "average programmer" in Access vba has no clue. But I have a clue. > > Access is, from top to bottom, an object oriented design. At the risk of > repeating myself, It is a remarkable piece of engineering IMHO. > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at gmail.com Mon Aug 31 06:53:05 2020 From: jwcolby at gmail.com (John Colby) Date: Mon, 31 Aug 2020 07:53:05 -0400 Subject: [AccessD] Access and OOP Message-ID: It is 2020. OOP has been around for a long time and Access is, top to bottom oop. So... If you were to interview with the mythical organization C2Db for an Access position, I would ask you: 1) Do you understand OOP? Yes. The only acceptable answer in 2020. 2) What is a class? A code construct that allows you to model a real world object, storing code and variables (and events) for that object. -- John W. Colby Colby Consulting From jwcolby at gmail.com Mon Aug 31 07:22:46 2020 From: jwcolby at gmail.com (John Colby) Date: Mon, 31 Aug 2020 08:22:46 -0400 Subject: [AccessD] Access and OOP Message-ID: If you were to interview with the mythical organization C2Db for an Access position, I would ask you: 1) Do you understand OOP? Yes. The only acceptable answer in 2020. 2) What is a class? A code construct that allows you to model a real world object, encapsulating code and variables (and events) for that object. Good answer. 3) Can you model more than one object in a class? No. A class models one object. Good answer. 4) In Access, do you use a form class to contain code, data and event handling for controls? Yes. Wrong answer. A form class is used to model a form. If you use a form module to contain data, methods and event handlers for a text box, now the form module is modeling a form and a text box. This is a fundamental error in OOP. Now you add data, methods and event handlers for combos, lists, radio buttons, check boxes, and who knows what else and what do you have? A very non OOP mess. Let's suppose that you have a form with 4 combo boxes and 10 text boxes. You want all the combos to raise 5 events. OnEnter, OnExit, OnGotFocus, OnLostFocus and OnDblClick. Your poor form now has 20 event sinks for those 4 combo boxes. Assume that you want the text boxes to have event sinks for the first 4 events. You have kjust added 40 new event handlers for those 10 text boxes. Assume that you want to store one property (the background color) for each of those controls. You now have 14 variables created in the header of the form class. Did I mention an OOP mess? That is what I mean by an OOP mess. How many developers have opened a form designed (by someone else) where the form class, when printed, has code which runs out in the hall, out the door and down to the stop sign at the corner? Yep, an OOP mess. How many of you have opened a bunch of forms and seen exactly the same code across all of those forms. Yep, an OOP mess. Are you that developer? Access provides us with a tool for this exact problem. It is called a class. A class can be passed a pointer to a combo box and that instance of the class now contains all of the data, code and event handling for that instance of that specific combo box. That instance sinks events for exactly that instance of a combo, has variables for that instance of that combo. has code for combos. Can a form class hold all the code for every thing you might want to put on a form. Yes. Do you instantly have an OOP mess? IMHO yes, you do. And finally, classes in Access are very similar to classes in any other language. They serve the same purposes. They exist. They should be used to solve those problems. Just MHO of course. There are many OOP choirs out there. The C# OOP choir is different from the Java OOP choir which is different from the Python OOP choir and from the Access OOP choir. But in order to be in the OOP choir, you must be using classes. Classes are the foundation of OOP. They solve a very real problem. They are all the rage, but for very good reasons. Access is not immune to the problems that OOP is designed to fix. I have provided examples of many different uses for classes in the examples I posted on GitHub. -- John W. Colby Colby Consulting From jimdettman at verizon.net Mon Aug 31 08:29:23 2020 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 31 Aug 2020 09:29:23 -0400 Subject: [AccessD] Classes and Withevents In-Reply-To: References: <001801d67f0f$224c21a0$66e464e0$@verizon.net> Message-ID: <007b01d67f9a$bdc1e3a0$3945aae0$@verizon.net> << I find it amusing that a progmmer says I don't use classes because they are not inheritable>> Guess I'm just an OOP snob then. Jim. -----Original Message----- From: AccessD On Behalf Of John Colby Sent: Monday, August 31, 2020 1:33 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Classes and Withevents I find it amusing that a progmmer says I don't use classes because they are not inheritable and then happily uses combos, text boxes, forms, reports, recordsets etc which are all classes and are not inheritable. An access class is every bit as powerful and useful as any other class in access, and are a paradigm shift once used. So no, I obviously am not preaching to the choir. On Sun, Aug 30, 2020, 16:50 Jim Dettman via AccessD < accessd at databaseadvisors.com> wrote: > John, > > You are preaching to the choir so to speak. > > I know what classes are, how to use them, and use them all the time when > doing C# or VFP. > > But when it comes to Access, lacking full inheritance, I just don't find > them overly useful or worth the overhead for the most part, and this is a > conversation we've had several times in the past that I don't care to > repeat. > > All I was offering was that since you've been out of Access for a while, > was letting you know that nothing fundamentally has changed, so if there > were issues you were running into, expect them still to exist. In fact, > recently the stability of Access has gotten worse. Microsoft has > introduced > more than a few killer bugs over the past couple of years, one of which is > now over two years old and a fix nowhere in sight. To be fair, it's the > Windows group that introduced the bug, but we're still left to deal with > it. > > The other part was that even to this day, classes are still not widely > used > in Access and I would not be shocked if you ran into new issues. A lot has > happened with Access since you stopped using it. > > As I said, FWIW. > > Jim. > > > -----Original Message----- > From: AccessD On Behalf Of John Colby > Sent: Sunday, August 30, 2020 1:34 PM > To: Access Developers discussion and problem solving > > Subject: [AccessD] Classes and Withevents > > Jim, you have to understand that in the framework and app I wrote I would > instantiate literally thousands of wrapper classes, sink events in those > classes, tear them back down etc. Thousands every single day for every > single user. And I didn't have issues. Shamile got out long before the > last two service packs were issued. > > I quite understand that Microsoft isn't actively doing anything with it. > Any remaining bugs will never be fixed. Yep, got it. On the other hand by > 2005 or whenever SP3 came out, Access was 15 years old and they had been > working on it up to that time. It is my opinion that it is remarkably > stable. It is also my opinion that there is no other DB FE RAD in > existence even close to it in pure data integration and OO integration. It > is a remarkable piece of engineering IMHO. > > Maybe I should offer MS a dollar to sell it to me? :) > > >>>There has been very little work done with classes in Access. Yes, I > know forms and reports in Access are classes, but that's a very different > thing from using classes in VBA. > > As for the classes, AFAIK the classes behind reports and forms are the > exact same thing as the classes that you can use if you so desire. And to > say that little work has been done with them ignores the fact that > everything in Access is a class. All the controls come from a base control > class. The DAO engine and everything in it is a class, AFAICT even the > properties of objects are classes. All the controls, forms and reports > know how to raise events. > > All classes can sink events. And they can sink events from ANYTHING passed > in to them that is saved "WithEvents". Every Access developer who uses > event sinks in a form or report class for handling the events from controls > is already sinking events. It is a miniscule jump to opening your own > class, passing in an object (control for instance), storing a pointer to > that "WithEvents" in the header of that class, and then sinking events from > that control inside of the class you just created. Trivial. > > And... the class itself can raise its own events. And, any class can take > a pointer to another class, store a pointer to that passed in class > "withevents" and sink the events from that class. And... anything that can > raise events can be saved in multiple locations and the events sunk in > every class where a pointer to the object is stored "WithEvents". So a > combo GotFocus event can be sunk in one or a thousand different classes. > Pass a pointer to a combo into a function in the class behind form of 10 > other forms, save a pointer to that combo "WithEvents" in the header of > that class, and each of those forms can sink the events from that combo. > > And... There are controls at the top of the class which display any objects > saved "WithEvents" in the top of the class, as well as all of the events of > said object. Selecting such an object and an event will stub out the event > sink for you. > > And... all this stuff ALSO works in Excel, Word, Power Point and so forth. > > This is precisely the same technology that C# provides. The syntax for > doing it is different of course but the capability is there. It is just > that the "average programmer" in Access vba has no clue. But I have a clue. > > Access is, from top to bottom, an object oriented design. At the risk of > repeating myself, It is a remarkable piece of engineering IMHO. > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at gmail.com Mon Aug 31 08:49:45 2020 From: jwcolby at gmail.com (John Colby) Date: Mon, 31 Aug 2020 09:49:45 -0400 Subject: [AccessD] Classes and Withevents In-Reply-To: <007b01d67f9a$bdc1e3a0$3945aae0$@verizon.net> References: <001801d67f0f$224c21a0$66e464e0$@verizon.net> <007b01d67f9a$bdc1e3a0$3945aae0$@verizon.net> Message-ID: Yeah On Mon, Aug 31, 2020, 09:30 Jim Dettman via AccessD < accessd at databaseadvisors.com> wrote: > << I find it amusing that a progmmer says I don't use classes because they > are > not inheritable>> > > Guess I'm just an OOP snob then. > > Jim. > > -----Original Message----- > From: AccessD On Behalf Of John Colby > Sent: Monday, August 31, 2020 1:33 AM > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Classes and Withevents > > I find it amusing that a progmmer says I don't use classes because they are > not inheritable and then happily uses combos, text boxes, forms, reports, > recordsets etc which are all classes and are not inheritable. > > An access class is every bit as powerful and useful as any other class in > access, and are a paradigm shift once used. > > So no, I obviously am not preaching to the choir. > > On Sun, Aug 30, 2020, 16:50 Jim Dettman via AccessD < > accessd at databaseadvisors.com> wrote: > > > John, > > > > You are preaching to the choir so to speak. > > > > I know what classes are, how to use them, and use them all the time when > > doing C# or VFP. > > > > But when it comes to Access, lacking full inheritance, I just don't find > > them overly useful or worth the overhead for the most part, and this is a > > conversation we've had several times in the past that I don't care to > > repeat. > > > > All I was offering was that since you've been out of Access for a while, > > was letting you know that nothing fundamentally has changed, so if there > > were issues you were running into, expect them still to exist. In fact, > > recently the stability of Access has gotten worse. Microsoft has > > introduced > > more than a few killer bugs over the past couple of years, one of which > is > > now over two years old and a fix nowhere in sight. To be fair, it's the > > Windows group that introduced the bug, but we're still left to deal with > > it. > > > > The other part was that even to this day, classes are still not widely > > used > > in Access and I would not be shocked if you ran into new issues. A lot > has > > happened with Access since you stopped using it. > > > > As I said, FWIW. > > > > Jim. > > > > > > -----Original Message----- > > From: AccessD On Behalf Of John Colby > > Sent: Sunday, August 30, 2020 1:34 PM > > To: Access Developers discussion and problem solving > > > > Subject: [AccessD] Classes and Withevents > > > > Jim, you have to understand that in the framework and app I wrote I would > > instantiate literally thousands of wrapper classes, sink events in those > > classes, tear them back down etc. Thousands every single day for every > > single user. And I didn't have issues. Shamile got out long before the > > last two service packs were issued. > > > > I quite understand that Microsoft isn't actively doing anything with it. > > Any remaining bugs will never be fixed. Yep, got it. On the other hand > by > > 2005 or whenever SP3 came out, Access was 15 years old and they had been > > working on it up to that time. It is my opinion that it is remarkably > > stable. It is also my opinion that there is no other DB FE RAD in > > existence even close to it in pure data integration and OO integration. > It > > is a remarkable piece of engineering IMHO. > > > > Maybe I should offer MS a dollar to sell it to me? :) > > > > >>>There has been very little work done with classes in Access. Yes, I > > know forms and reports in Access are classes, but that's a very different > > thing from using classes in VBA. > > > > As for the classes, AFAIK the classes behind reports and forms are the > > exact same thing as the classes that you can use if you so desire. And > to > > say that little work has been done with them ignores the fact that > > everything in Access is a class. All the controls come from a base > control > > class. The DAO engine and everything in it is a class, AFAICT even the > > properties of objects are classes. All the controls, forms and reports > > know how to raise events. > > > > All classes can sink events. And they can sink events from ANYTHING > passed > > in to them that is saved "WithEvents". Every Access developer who uses > > event sinks in a form or report class for handling the events from > controls > > is already sinking events. It is a miniscule jump to opening your own > > class, passing in an object (control for instance), storing a pointer to > > that "WithEvents" in the header of that class, and then sinking events > from > > that control inside of the class you just created. Trivial. > > > > And... the class itself can raise its own events. And, any class can > take > > a pointer to another class, store a pointer to that passed in class > > "withevents" and sink the events from that class. And... anything that > can > > raise events can be saved in multiple locations and the events sunk in > > every class where a pointer to the object is stored "WithEvents". So a > > combo GotFocus event can be sunk in one or a thousand different classes. > > Pass a pointer to a combo into a function in the class behind form of 10 > > other forms, save a pointer to that combo "WithEvents" in the header of > > that class, and each of those forms can sink the events from that combo. > > > > And... There are controls at the top of the class which display any > objects > > saved "WithEvents" in the top of the class, as well as all of the events > of > > said object. Selecting such an object and an event will stub out the > event > > sink for you. > > > > And... all this stuff ALSO works in Excel, Word, Power Point and so > forth. > > > > This is precisely the same technology that C# provides. The syntax for > > doing it is different of course but the capability is there. It is just > > that the "average programmer" in Access vba has no clue. But I have a > clue. > > > > Access is, from top to bottom, an object oriented design. At the risk of > > repeating myself, It is a remarkable piece of engineering IMHO. > > > > -- > > John W. Colby > > Colby Consulting > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at gmail.com Mon Aug 31 12:11:01 2020 From: jwcolby at gmail.com (John Colby) Date: Mon, 31 Aug 2020 13:11:01 -0400 Subject: [AccessD] Access and ... Rubber Duck? Message-ID: LOL well it's just amazing where we can go when we least expect it. I'm going to leave it up to anyone who has the slightest interest in real Access (VBA) coding to go explore these: https://rubberduckvba.wordpress.com/ https://rubberduckvba.com/News https://www.youtube.com/watch?v=sKUYfiWSFLY And finally, Access implements interfaces. Which allows some real neat tricks such as passing classes into a function based on not the class type but the interface that the class implements. IOW dimming a variable as an interface type. I did not know that, which is where I was taken today. It is going to take me some time to wrap my head around the implementation (pun intended) in my own Access code. -- John W. Colby Colby Consulting From jwcolby at gmail.com Mon Aug 31 12:29:18 2020 From: jwcolby at gmail.com (John Colby) Date: Mon, 31 Aug 2020 13:29:18 -0400 Subject: [AccessD] VBA Implements Message-ID: https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/implements-statement -- John W. Colby Colby Consulting From charlotte.foust at gmail.com Mon Aug 31 18:47:00 2020 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 31 Aug 2020 16:47:00 -0700 Subject: [AccessD] Access and ... Rubber Duck? In-Reply-To: References: Message-ID: It doesn't work in Access quite the way it does in other Office apps or the way it does in VB. Charlotte Foust (916) 206-4336 On Mon, Aug 31, 2020 at 10:11 AM John Colby wrote: > LOL well it's just amazing where we can go when we least expect it. I'm > going to leave it up to anyone who has the slightest interest in real > Access (VBA) coding to go explore these: > > https://rubberduckvba.wordpress.com/ > https://rubberduckvba.com/News > https://www.youtube.com/watch?v=sKUYfiWSFLY > > And finally, Access implements interfaces. Which allows some real neat > tricks such as passing classes into a function based on not the class type > but the interface that the class implements. IOW dimming a variable as an > interface type. > > I did not know that, which is where I was taken today. It is going to take > me some time to wrap my head around the implementation (pun intended) in my > own Access code. > > -- > John W. Colby > Colby Consulting > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >