After implementing the FMS OpenAllDatabases example code, my fields are NULL when I open a form or report.

Follow

Comments

3 comments

  • Avatar
    Alex Rotella

    In order to debug further, I inserted a DoCmd.OpenQuery for the query that the report utilizes. Sure enough, it appears that there is no data returned until I click on the filter in one of the columns. Once I clicked to view the filter options, I see  the customer name that I selected from the form, and the checkbox is checked next to that value. Yet, that record is still not displaying in the datasheet view. Please see the attachment. Can somebody please explain why this is happening?

     

     




    QueryDatasheet.png
  • Avatar
    Alex Rotella

    Yes, I am very confident that this issue never occurred prior to OpenAllDatabases being implemented. It has been functioning fine for roughly a year. When I comment out the OpenAllDatabases call, it works fine. As soon as I make a call to this sub, the issue surfaces immediately. 

    So far, I have been able to reproduce the issue on a form and a report. As far as the form, there are no OnLoad or OnOpen events. It's a pretty standard form with bound fields. When I try to pull up the form one time, it pulls up all null values. Then, when I open the form a second time for the same customer, it has all values populated. As far as the report, the only code I have when it opens is code to show the toolbar. I even commented out this code, but it did not make a difference. It almost seems like the form and report do not process the SQL rapidly enough in order to populate. 

  • Avatar
    FMS Technical Support

    In our testing, we've not been able to reproduce this issue. We've attached the sample that we used. Please see the attached zip file which contains a frontend and backend database mapped to the folder path of "C:\test".

    When you open the database, it automatically fires the OpenAllDatabases code and opens a query using DoCmd.OpenQuery. Please run the test to see if this database works on your system.




    test.zip

Please sign in to leave a comment.