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
ddy79-433jv-2rxgx-mqfqp-pfdh8 The above code worked. I had used Magic Jelly Bean but it only gave me...
(More)
ddy79-433jv-2rxgx-mqfqp-pfdh8 The above code worked. I had used Magic Jelly Bean but it only gave me the code for Vista in general..THANK YOU SO MUCH!
I purchased and loaded expert pdf6.0 with very unfortunate results. Immediately after loading it I...
(More)
I purchased and loaded expert pdf6.0 with very unfortunate results. Immediately after loading it I experienced difficulties with microsoft word 2007 (home & student version). Word kept crashing when I tried to close the document I was working on. It took me some time to realise that it was your program that was the source of the problem. In the end I had to offload all my files and use the PCs recovery disk before reloading all my programs. Everything worked fine until I re-loaded your program when the same problem occurred again. I uninstalled it and the problem has disappeared. Do you have a solution? I previously purchased pdf5.0 from you and that program worked well although it was far from convenient to use.
i received no redundancy or owed holiday pay in my last wage,how do i write a letter of complaint to...
(More)
I RECEIVED NO REDUNDANCY OR OWED HOLIDAY PAY IN MY LAST WAGE,HOW DO I WRITE A LETTER OF COMPLAINT TO MY EMPLOYER