Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

ACCESS & REPORTS VBA?

Alright, I have a bunch of data contained in arrays which has been manipulated by VBA from tables.

I need to put populate a report with this data. I've managed to make the report just fine, with all the labels showing up, but I just can't get the data down.

I have tried:

Adding & populating:

-combo boxes,

-list boxes

-text boxes -- all of which generated an error something like, "this property is not available in design view"

I've also tried the me.print function, which results in a different error.

Don't question why I'm using VBA, just trust me, it's necessary.

P.S

I'm new to the Access environment, and thus far hate databases. So please no SQL bull crap.

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    I don't envy you one bit. It is much more difficult to program VBA in Access than it is in Excel. I've gotten fairly proficient at VBA programming in Access but it is a pain and I try avoiding it if I can. If I can do it with an Access Macro I use a macro, if that won't work then I start looking at SQL and a query. When all else fails go to the VBA coding. Those seem to be the best order to go in to save time. But I also realize that to manipulate the data like you need to that you may need to manipulate it in an array with VBA.

    To me, it looks like you are trying to print the form rather than the actual report and Access doesn't really like printing the form, or makes it pretty difficult to print the form.

    You need to come at this thing from a different angle. I'd recommend populating an access table with the data from your array. Here is kind of an example:

    http://msdn.microsoft.com/en-us/library/aa140074(o...

    Populate the table with the array, then use the table to create your report from. It will be much easier to move the data to a table then use the table to create the report. If you have trouble moving the data to a table, then I'd recommend pasting the array to an Excel worksheet. I think it is a lot easier pasting arrays to an excel worksheet than it is to move the data to an Access table. Then you can import the data from the Excel worksheet and turn it easily into an Access table.

    Access is just a pain to program VBA in. I don't think Microsoft really worked out all the bugs on VBA in Access. And their help files on it aren't the best either. And many times I've had to create work arounds to make something work. And a few times I've had my VBA code work perfectly fine then all of a sudden BOOM...it doesn't work anymore. Why? Microsoft adds a new service pack and the coding that once worked no longer works and you have to write yet another work around. I had to do that when they moved from service pack 2 of Access 2003 to service pack 3 of the program. It doesn't like some of the labels for listbox headers that once worked in service pack 2.

    Welcome to the Access VBA programming nightmare.

  • 1 decade ago

    You are using Access but want to avoid using SQL? Yeah, good luck with that...

Still have questions? Get your answers by asking now.