473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Opening forms with arguments through a Menu item

I am trying to use a consolidated filter form, where I pass
the desired report I wish to run. I would like to install
this form on my custom menu bars, but I can't figure out any
way to pass data to the form via the menu.

I have looked for a RunCode menu type, where I could use
DoCmd. I have tried the form type, but I can't access
OpenArgs. Are there any other ideas out there?

Thanks,

Kevin
Nov 13 '05 #1
1 2133
Just a followup on what I had to do to get this to work.
But first, a little backup. I am running Access 2003, and I
have several reports that I would like to apply filters to.
Each report uses the same parameters. So I built a form
that collected the data needed, then executed the report
with the correct filter defined.

The problematic piece was that I wanted to run this off a
custom menu. The OpenForm option did not work because I
couldn't configure OpenArgs. Also, I couldn't find any
RunCode command that I could attach to a menu.

What I had to do was build a separate macro for each report.
Each macro uses the RunCode feature to run a function,
called RunForm. RunForm has two parameters, the name of the
filter form, and the name of the report. It uses the
DoCmd.OpenForm method to run the passed form, and passes the
Report name in the OpenArgs parameter.

Then, the report collects OpenArgs and configures the
Form.Caption and cmdRunReport command button to show and
execute the correct report.

I really didn't want to have to create an extra database
object for each report. This could have been avoided if
RunCode was available as a menu option.

Kevin Nechodom
Kevin Nechodom<Ke************@nospamhsc.utah.edu>
4/6/2005 2:04:20 PM >>>I am trying to use a consolidated filter form, where I
pass
the desired report I wish to run. I would like to install
this form on my custom menu bars, but I can't figure out
any
way to pass data to the form via the menu.

I have looked for a RunCode menu type, where I could use
DoCmd. I have tried the form type, but I can't access
OpenArgs. Are there any other ideas out there?

Thanks,

Kevin

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Susan Bricker | last post by:
Hi. I am trying to open a form using 'openargs' parameter of the docmd.openform action. The problem is that I would like to pass the form some character (string) and integer data. My plan was to...
11
by: Ahmet AKGUN | last post by:
Hi; is it possible to open one form in .net platform that we have its name in string ? I have string sFormName = "frmCustomer"; and I must automatically open Customer form. or is it...
3
by: yup | last post by:
I was wondering if you know a way to have, let's say, you would click on a menu bar item (where something like file, edit, format, help options are on Microsoft Word) and instead of opening a...
7
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
7
by: Martien van Wanrooij | last post by:
I have been faced a couple of times with the situation that I wanted to write a script and was worried about a too frequent opening and closing mysql connections. To give some examples: 1)I...
6
by: Cashewz | last post by:
Using a menu item to write to a sequential file from the parent form, what code and where would I put it to write the text values, settings, bool values from various child menues?
11
by: Tony K | last post by:
I have a MDI application. On the menu toolstrip child forms are selected from one of the menus. I don't want to play the disable/enable menu item game. I have selected that open forms are added...
7
by: Abhi | last post by:
Hi, I want to open a File with unknown Extension using C#. What i want is i do System.Diagnostics.Process.Start("FileName"); Now if File is associated with any program then the File with open...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.