I have a database caled CMS.db.I have four reports namely rptenq,rptall,rptdept,rptlist.I have a main form called Main.My problem is i want to list my reports in a list box and give the user the ability to open the report in the main form.
Hi, There a couple of different way you could do this and I have put two lots of VB code below that you can modify and use. Firstly you create the Combobox list by choosing the option that you will type the values yourself, you then type in all your report names on each line. After that you can then go to the VB code editor and paste my code in and modify it by changing my report names, (Customers) etc to your report names. Make sure you choose the Combobox and the On_Click option in the VB editor to paste the code into. I like the first method better which checks the value of the Combobox and then opens the corrosponding report in the maximised form. The second method does the value check before running an assigned macro to open each report. With this you must first assign macros to each report in Access. Remember each of these bits of code must be placed between the "Private Sub" heading and the "End Sub" ending, and change the "Combo23" name to reflect your combobox too. If you need a hand just email me.
First Method
If Combo23.Value = "Customers" Then DoCmd.OpenReport "Customers", acViewPreview, acWindowNormal DoCmd.Maximize
If Combo23.Value = "Customers" Then DoCmd.RunMacro "Macro1" DoCmd.Maximize ElseIf Combo23.Value = "Customers 1" Then DoCmd.RunMacro "Macro2" DoCmd.Maximize ElseIf Combo23.Value = "Customers 2" Then DoCmd.RunMacro "Macro3" DoCmd.Maximize End If
My Quicken 2009 Deluxe program shows HUGE fonts to the point I cannot see the entire page on my...
(More)
My Quicken 2009 Deluxe program shows HUGE fonts to the point I cannot see the entire page on my screen. It tells me to change it, I do, and everything is teeney, change again, and back to the same place. It's like it is guessing on the size.
When I change the origin of the object after unlocking the syncing of position and origin the object...
(More)
When I change the origin of the object after unlocking the syncing of position and origin the object shrinks drastically and changes position anyway.
I have one customer who's O/S debt is NOT included in the ''aged overdue receivables'' . when I go...
(More)
I have one customer who's O/S debt is NOT included in the ''aged overdue receivables'' . when I go into the customer's data it is all in GREY and I cannoy edit it....it is like ''frozen''. I think that the two things are connected ie: frozen customer = not included in Aged report. If i call the customers debt in ''Receipst'' it DOES show up!!...meaning the debt IS in the sys. it just doesn't want to show.... Any ies??