Using clsMsgPD - The Big Edit (1 Viewer)

@AHeyne
Thanks for converting the APIs. Were many changes needed in Type statements and variable declarations in procedures?
No, not much. It also seemed that not all procedures using APIs declarations are used at all. And some could be replaced by other techniques, but I just corrected the API declarations.
 
Thanks but...
I need such changes to be in my db out on GitHub.
I didn't know that, sorry. I just downloaded your accdb, corrected and uploaded it. You could export both versions to text files (as you mentioned GitHub you seem to know how this can be done) and compare the text files. It's not much work. Then you can correct the text files on GitHub by hand.
I prefer to use Diffinity (http://truehumandesign.se/s_diffinity.php), which can compare files and folders.

Edit:
Ok, after reading all you postings it seems to have been done already. ;-)
 
Last edited:
I didn't know that, sorry. I just downloaded your accdb, corrected and uploaded it. You could export both versions to text files (as you mentioned GitHub you seem to know how this can be done) and compare the text files. It's not much work. Then you can correct the text files on GitHub by hand.
I prefer to use Diffinity (http://truehumandesign.se/s_diffinity.php), which can compare files and folders.

Edit:
Ok, after reading all you postings it seems to have been done already. ;-)
LOL. No, I don't know github. I use it only as a place to get the file off of my computer and publicly available to anyone who wants it. If you do understand such things how would one compare two access databases and get anything useful out of the comparison. These are databases (binary blobs of data) not text files.
 
I didn't know that, sorry. I just downloaded your accdb, corrected and uploaded it. You could export both versions to text files (as you mentioned GitHub you seem to know how this can be done) and compare the text files. It's not much work. Then you can correct the text files on GitHub by hand.
I prefer to use Diffinity (http://truehumandesign.se/s_diffinity.php), which can compare files and folders.

Edit:
Ok, after reading all you postings it seems to have been done already. ;-)
I know how to export classes, forms and modules. However there are things such as queries, tables, data in tables, properties of things etc. NCAA how to do this globally. And I don't have a tool (yet) to automate exporting the things that make sense and getting them back in.

I'm a GitHub hack.
 
@jwcolby54 : I use my one solution (which isn't so well integrated yet), but here you can watch a presentation of a widely used Access add-in by Adam Waller:
 
Adam will also leading a presentation for Access Europe User Group in September where his focus will be on how source code control can also be very useful for sole developers

My reason for suggesting a 64-bit VM is to give you time so you can convert all your code to work in both 64-bit and 32-bit.
Once you have done each database, continue development in 64-bit ONLY. It will still work in 32-bit.
When all are done, swop so your main development machine is 64-bit.
 
@jwcolby54 : I use my one solution (which isn't so well integrated yet), but here you can watch a presentation of a widely used Access add-in by Adam Waller:
I was scrolling down to post a link for Adam's presentation. I have started using this Version Control Add-in. And I believe that he's working on a better GitHub integration for it.

The link for his GitHub: https://github.com/joyfullservice
 
Adam will also leading a presentation for Access Europe User Group in September where his focus will be on how source code control can also be very useful for sole developers

My reason for suggesting a 64-bit VM is to give you time so you can convert all your code to work in both 64-bit and 32-bit.
Once you have done each database, continue development in 64-bit ONLY. It will still work in 32-bit.
When all are done, swop so your main development machine is 64-bit.
I am retired. I am trying to write a book evangelizing the use of classes, events and frameworks. I know that well and I feel that there is no real solid documentation for teaching that to devs who don't use classes or frameworks. I am trying to create that. Solid documentation on this stuff. That is my sole reason for even being on this forum. A VM with 64 bit Access / demodb etc is almost certainly not in my future.

I will say that the number of folks here on this forum that understand this stuff is large(?), but percentage wise on the total number of devs that are here? I have not been here long enough to even guess but if I had to I would say it isn't a large percentage. Historically the percentage of Access (or Excel or Word) devs who even know anything about classes is pretty small. The common thread seems to be that "cats meow and dogs bark" isn't useful to me. I agree with that, not to mention that is about inheritance, which isn't a thing in VBA.

I don't know whether I will succeed with the book but I haven't found another book about this subject. This isn't about money. The book is free. The demo database is free.
 
You are doing an excellent job at evangelizing! I was just trying to encourage you to potentially double your audience 😎

I wish I had the time to be fully involved in the excellent work you are doing but at the moment that isn't possible for me due to my other commitments. However, I am trying to follow your many threads as best as I can.

The proportion of Access developers who are confident in the use of classes is indeed small but the interest in becoming proficient is enormous.
Hence the popularity of the various AUG sessions on classes in recent years.
 
I would say you are putting off potential readers by being 32-bit only - not just me!
The proportion of developers using 64-bit is increasing all the time and surveys at Access DevCon etc suggest its now probably the majority.
Whilst those who need it may be willing to do the conversion themselves, there are a lot of classes to check!

There are many articles about converting to 64-bit, though many make it unduly complicated (or are incorrect)
The process is fairly easy but can be time consuming.
It really needs someone who knows the code so they can check it is working correctly in 64-bit

I have a series of 5 articles on the subject starting with:

My advice is to ignore A2007 and earlier in which case you don't need conditional compilation - see article 2 in that series
I imagine the issue is that the 64 bit is now the default, and not many people need to deal with the differences.

I have apps in use that's built in 32bit, and I don't want to try to convert it to 64, so users have to install 32bit office to use the databases.
 
I am retired. I am trying to write a book evangelizing the use of classes, events and frameworks. I know that well and I feel that there is no real solid documentation for teaching that to devs who don't use classes or frameworks. I am trying to create that. Solid documentation on this stuff. That is my sole reason for even being on this forum. A VM with 64 bit Access / demodb etc is almost certainly not in my future.
You could try to do without any bitness-specific code in your examples.
It is not needed for the pure teaching of class programming anyway.
 
Couldn't John hold off for 10 seconds or more on his DB and you just repeat your process one more time?
Then use that from then on.
I realise you have to make the changes all over again, but would then be it?
 
@Gasman : If you mean me, I have to admit that I don't quite follow. :)

@jwcolby54 :
Since your code is primarily exemplary, you could, for example, replace the API routines for determining the computer and user name with the following simple code for the sake of simplicity:
Code:
Public Function WinMachineName() As String
    WinMachineName = Environ("COMPUTERNAME")
End Function

Function WinUsername()
    WinUsername = Environ("USERNAME")
End Function

Then you could get rid of these api declarations:
Code:
Private Declare PtrSafe Function GetComputerName Lib "kernel32.dll" Alias "GetComputerNameA" (ByVal lpBuffer As String, ByRef nSize As Long) As Long
Private Declare PtrSafe Function GetWinUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

And the class 'clsTimerHS' is only used in module 'basInitClasses' in procedure 'cTimerHS', which isn't used at all. So class 'clsTimerHS' and procedure 'cTimerHS' could be removed and you have less bitness relevant code.

So the bottom line is that a little tidying up or clearing out could help. ;)
 
@AHeyne
Sorry. I meant that if John stopped changing his DB for a day or so, and you could either download the latest version from GitHub, or better still, have it sent by John directly to you. You make your changes for 64 bit and send back. That DB then becomes the defnitive DB to be continually amended by John from then on?
 
Sorry. I meant that if John stopped changing his DB for a day or so...
John is definitely "All Gas, No Brakes"...

Not complaining, but keeping up and trying to take it in is like drinking from a fire hydrant!
 
You could try to do without any bitness-specific code in your examples.
It is not needed for the pure teaching of class programming anyway.
There is very little bitness specific anyway. AFAI remember only the timer classes do calls to the OS. It is not I pushing the bitness thing, I don't really care as I don't (can't) use 64 bit anyway.
 
Couldn't John hold off for 10 seconds or more on his DB and you just repeat your process one more time?
Then use that from then on.
I realise you have to make the changes all over again, but would then be it?
I believe the bitness changes got implemented and are now in the version up on GitHub. I donwloaded the changed version and pushed that up to GitHub so they should be there.
 
John,
There are a few Declares.
Code:
Private Declare Function GetComputerName _
Lib "kernel32" Alias "GetComputerNameA" ( _
       ByVal lpBuffer As String, nSize As Long) As Long

Declare Function GetWinUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Declare Function apiGetFrequency Lib "kernel32" _
      Alias "QueryPerformanceFrequency" ( _
      ByRef Frequency As Currency) _
      As Long
 
Private Declare Function apiGetTimeFast Lib "kernel32" _
      Alias "QueryPerformanceCounter" ( _
      ByRef Counter As Currency) _
      As Long
    
Private Declare Function apiGetTimeSlow Lib "winmm.dll" _
                                    Alias "timeGetTime" () As Long

' Already converted?
#If VBA7 Then 'A2010 or later (32-bit/64-bit)
    Private Declare PtrSafe Function apiGetTime Lib "winmm.dll" Alias "timeGetTime" () As Long
    Private lngStartTime As Long
#Else 'VBA6 (A2007 or earlier
    Private Declare Function apiGetTime Lib "winmm.dll" Alias "timeGetTime" () As Long
    Private lngStartTime As Long
#End If



Private Declare Function apiGetTime Lib "winmm.dll" _
               Alias "timeGetTime" () As Long

Declare PtrSafe Sub wlib_AccColorDialog Lib "msaccess.exe" Alias "#53" _
                                                (ByVal hWnd As Long _
                                                , lngRGB As Long)

That appears to be it?, so not many?
 
Last edited:
@AHeyne
Sorry. I meant that if John stopped changing his DB for a day or so, and you could either download the latest version from GitHub, or better still, have it sent by John directly to you. You make your changes for 64 bit and send back. That DB then becomes the defnitive DB to be continually amended by John from then on?
If John would like to proceed this way, why not.

John,
There are a few Declares

These you posted here are not 64-bit capable (the ones I customized were). But as I wrote here the first five of your list can be omitted completely.
 

Users who are viewing this thread

Back
Top Bottom