Temporary table in read-only database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • juing
    New Member
    • Apr 2009
    • 10

    Temporary table in read-only database

    Hi,

    I need to generate a Report. Unfortunately the report can not be constructed from calculated data. My data is populated only in the ValueList type ListBoxes.

    So I decided to create a temporary tables, move the data into these tables and use them to build the Report.

    The problem is that I need to be able to generate the Report also when the MDB file is set as read-only.
    Is there a way to have those tables only in memory or any other way to generate the Report?

    Thanks a lot
    juing
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    Is original data added to the list boxes manually each time the database is used, or is it derived from some stored information?

    Comment

    • juing
      New Member
      • Apr 2009
      • 10

      #3
      Originally posted by ChipR
      Is original data added to the list boxes manually each time the database is used, or is it derived from some stored information?
      List Boxes are generated dynamically according to data chosen in the form which contains them.

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #4
        Take a look at this link: http://www.mvps.org/access/reports/rpt0014.htm. If you use a global recordset variable, I believe you can store your data there, and set the report's source data to that recordset when you open it.

        Comment

        • juing
          New Member
          • Apr 2009
          • 10

          #5
          Originally posted by ChipR
          Take a look at this link: http://www.mvps.org/access/reports/rpt0014.htm. If you use a global recordset variable, I believe you can store your data there, and set the report's source data to that recordset when you open it.
          Thanks, I've already found this. In that example, the source of the Recordset is a QUERY and thus it is possible to assign it to the Report.

          I've already tried to manually open an ADODB.Recordset , create some fields there, add some records but haven't found any way hot to assign it to the Report's RecordSource property :(

          Comment

          • ChipR
            Recognized Expert Top Contributor
            • Jul 2008
            • 1289

            #6
            If you're able to create the recordset, what's the problem you encounter when you set the report's record source to the recordset as in the link?

            Comment

            • ChipR
              Recognized Expert Top Contributor
              • Jul 2008
              • 1289

              #7
              It looks like the name property is read-only, and I can't figure out what sets it. Maybe if you were to .Save the recordset to a file and reopen it?

              Comment

              • juing
                New Member
                • Apr 2009
                • 10

                #8
                VBA help says:
                "The RecordSource property setting can be a table name, a query name, or an SQL statement. For example, you can use the following settings."

                That exactly is in the example since the Name property is set to the SQL string "Select * from tblTest1 where longfield=4".
                So the RecordSource is properly set to the query.

                But if I have manually created Recordset it doesn't have such a Name property since it is not a query. So I have nothing to put to the RecordSource property of the Report.

                Comment

                Working...