I posted a similar question a long time ago but never got round to resolving the issue. I tried the suggestions given but no luck. However I have had a chance to do further digging and have more information.
I have a very old VB6 program that I wrote, accessing an Access database, running on Windows XP. I am trying to convert it to run on Windows 7 & Windows 10 but both have the same issue.
The program prints labels. It has many functions including maintaining the database (add, delete, update and copy records), specifying search criteria and producing labels and addresses lists.
I have managed to get all the functionality working except one area in both Windows 7 & Windows 10.
The remaining problem is that the selected records are not being displayed in the text boxes on the form.
However, I know the database is being accessed correctly as the option to display the selected records on a form in a ListBox works fine. The SQL statement for the selection is generated correctly.
I can also print the sticky labels for the selection.
Also, on the form which displays the individual records, there is a Label which shows the count of the number of records selected. This is displayed correctly.
This is picked up from Adodc1.Recordset.RecordCount.
I have a Adodc object on the form to cycle round the records selected. This cycling works fine. However, the text fields which are linked to show the Access fields of each record as I cycle round are blank. That is, they are not being populated with the field values.
The main form uses an ADODC object, Adodc1, on the form to specify the database properties
CommandString: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Trevor\Labels\Label.mdb;Persist Security Info=False
RecordSource: SELECT * FROM address ORDER BY recno (the SELECT record can be further modified with WHERE selection criteria via options on the form).
(I have also tried using a converted .accdb access database with appropriate provider, i.e.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Trevor\Labels\Label.accdb;Persist Security Info=False
but same problem)
For the Windows 10 version I had to register 2 ocx files: mscomct2.ocx, msadodc.ocx. I downloaded them into c:\windows\SysWOW64.
These I downloaded from the internet for my Windows 10 (64-bit) machine.
(For the Windows 7 version I didn't have to download them as no error was given).
Thinking about it, should I I use these 2 ocx files from the XP system? I might try this.
I only have the VB6 development environment on the XP machine. So I have to change the program from there and copy the .exe file and database file over to the Windows 7 & Windows 10 machines.
Any help or suggestions would be appreciated.
I have a very old VB6 program that I wrote, accessing an Access database, running on Windows XP. I am trying to convert it to run on Windows 7 & Windows 10 but both have the same issue.
The program prints labels. It has many functions including maintaining the database (add, delete, update and copy records), specifying search criteria and producing labels and addresses lists.
I have managed to get all the functionality working except one area in both Windows 7 & Windows 10.
The remaining problem is that the selected records are not being displayed in the text boxes on the form.
However, I know the database is being accessed correctly as the option to display the selected records on a form in a ListBox works fine. The SQL statement for the selection is generated correctly.
I can also print the sticky labels for the selection.
Also, on the form which displays the individual records, there is a Label which shows the count of the number of records selected. This is displayed correctly.
This is picked up from Adodc1.Recordset.RecordCount.
I have a Adodc object on the form to cycle round the records selected. This cycling works fine. However, the text fields which are linked to show the Access fields of each record as I cycle round are blank. That is, they are not being populated with the field values.
The main form uses an ADODC object, Adodc1, on the form to specify the database properties
CommandString: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Trevor\Labels\Label.mdb;Persist Security Info=False
RecordSource: SELECT * FROM address ORDER BY recno (the SELECT record can be further modified with WHERE selection criteria via options on the form).
(I have also tried using a converted .accdb access database with appropriate provider, i.e.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Trevor\Labels\Label.accdb;Persist Security Info=False
but same problem)
For the Windows 10 version I had to register 2 ocx files: mscomct2.ocx, msadodc.ocx. I downloaded them into c:\windows\SysWOW64.
These I downloaded from the internet for my Windows 10 (64-bit) machine.
(For the Windows 7 version I didn't have to download them as no error was given).
Thinking about it, should I I use these 2 ocx files from the XP system? I might try this.
I only have the VB6 development environment on the XP machine. So I have to change the program from there and copy the .exe file and database file over to the Windows 7 & Windows 10 machines.
Any help or suggestions would be appreciated.