Run Macro only if certain form is open

I have programed a maco to open one of various forms depending on criteria on 
an open form.  Is there a way to run a "follow up Macro" based on which form 
opens? In other words can I run a macro based on wheather a certain form is 
active?
-- 
Thanks,
Chuck
0
Utf
3/6/2008 12:39:08 AM
access.forms 6864 articles. 2 followers. Follow

4 Replies
2324 Views

Similar Articles

[PageSpeed] 34

Take a look at the RunMacro Method of the DoCmd object. You can have it as
part of the OnLoad of the form in question.

Chuck wrote:
>I have programed a maco to open one of various forms depending on criteria on 
>an open form.  Is there a way to run a "follow up Macro" based on which form 
>opens? In other words can I run a macro based on wheather a certain form is 
>active?

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200803/1

0
StrayBullet
3/6/2008 1:01:52 AM
Thank you.  That makes sense.
-- 
Thanks,
Chuck


"StrayBullet via AccessMonster.com" wrote:

> Take a look at the RunMacro Method of the DoCmd object. You can have it as
> part of the OnLoad of the form in question.
> 
> Chuck wrote:
> >I have programed a maco to open one of various forms depending on criteria on 
> >an open form.  Is there a way to run a "follow up Macro" based on which form 
> >opens? In other words can I run a macro based on wheather a certain form is 
> >active?
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200803/1
> 
> 
0
Utf
3/6/2008 1:21:00 AM
Chuck,

You can use a Condition in your macro, like this:
[Screen].[ActiveForm].[Name]="whatever form"

-- 
Steve Schapel, Microsoft Access MVP

Chuck wrote:
> I have programed a maco to open one of various forms depending on criteria on 
> an open form.  Is there a way to run a "follow up Macro" based on which form 
> opens? In other words can I run a macro based on wheather a certain form is 
> active?
1
Steve
3/6/2008 2:25:30 AM
That is exactly what I needed.
-- 
Thanks,
Chuck


"Steve Schapel" wrote:

> Chuck,
> 
> You can use a Condition in your macro, like this:
> [Screen].[ActiveForm].[Name]="whatever form"
> 
> -- 
> Steve Schapel, Microsoft Access MVP
> 
> Chuck wrote:
> > I have programed a maco to open one of various forms depending on criteria on 
> > an open form.  Is there a way to run a "follow up Macro" based on which form 
> > opens? In other words can I run a macro based on wheather a certain form is 
> > active?
> 
0
Utf
3/6/2008 4:37:01 PM
Reply:

Similar Artilces:

Need only one DLL instance to run...
Hi all, 1: if two apps load the same DLL - LoadLibrary(...) - system will create to different instance of the DLL... Now, in my DLL i've a CList and i need it to be visible to all instance and all apps!!!! Is there a way!? 2: I need the dll to remain loaded till machine reboot!!! Is it possible!? Thanks Ale >if two apps load the same DLL - LoadLibrary(...) - system will create to >different instance of the DLL... >Now, in my DLL i've a CList and i need it to be visible to all instance and >all apps!!!! > >Is there a way!? It'll be difficult to share a ...

credentials to run this report are not stored
Hi all, I'm getting this problem when I try and create a timed subscription. Error: ...credentials to run this report are not stored..... ok I created another folder under the same folder where I'm having this problem. loaded the report and I have no problem. I even moved the current folder with that report in it. Creted another folder with the same name and still the same problem with that named folder. With a different name for the folder I have no problem??? I'm stuck here.. almost all post just talk about storing the credentials, Already done and works...

Disable Tab and/or Section in form
Hi i have another question. May i disable by javascript a tab a/o section in a form? If it is possible can you give me a sample? Thank's Marco Rocca Marco, Here are instructions for hiding a tab: http://blogs.infinite-x.net/?p=3 Thanks, Mitch ...

System Error when opening Excel 2007
A client is receiving this error "system Error &H80004005(-2147467259)" in excel 2007 when opening a new file or an exisiting file. This error came up after visio 2003 was uninstalled and visio 2007 got installed on his system. This error can be a lot, and I looked a bit around where they say it might be something with memory. But then I wonder why he never gave this error before untill visio 2007 got installed. Any help is welcome and I would be very thankfull to those who can help me in this issue. Greetz ...

customize contact form?
Have created custom contact form and want to make it my default and also let others use it. Don't know how to use VB. Is there any other way to implement it? http://www.outlookcode.com/d/newdefaultform.htm should provide some pointers. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Dave asked: | Have created custom contact form and want to make it my default...

Automatically run macro
My name is Mike and i have a question about microsoft excel macro's. Attached is a copy of the excel sheet im working on. Below the excel sheet is the macro I built. Some of the cells contain given values and some cells are calculated from formulas. Cell (G4) is my given value...it is related to cell (C32). The point is, I plug a value into cell (C10) and it runs through the rest of the calcs in the other cells and gives me a value to cell (C32). I built a macro that works as a goal seek pretty much. The macro makes cell (C32) equal to cell (G4) and gives me the value for cell (C10). I wan...

run time error 10-22-03
I am having a lot of trouble when I open up word I get run time error 52 in VB. I have tried uninstalling word and reinstalling it. WE have tried deleting the macro but still to no avail can someone help me please? ...

Repost: Error running Report in an Access 2003 db from Access 2007
Ok, clarification - ignore the code from my original post, some of the reports do work. The ones that don't are reports that I have being filtered. Here is the code from one of those buttons: Private Sub Ok_Click() On Error GoTo Ok_Click_Err 'using the customer sub form for customer state report to filter the report, clicking ok will open report for selected state Dim stDocName As String Dim stLinkCriteria As String If Not IsNull(Me.Search_Results) Then stLinkCriteria = "[StateOrProvince] = """ & Me![Search Results] & """"...

Excel Continuous Running Total
I posted a message earlier and have received a partial solution. I want to keep track of how much stock prices go up or down with a running total of how much they go up or down over several days until the direction changes. For example, if price go up 10 on Mon, 20 on Tues, 30 on Thurs and down 10 on Fri I want my running total column to show a positive number of 60 and then a red number of 10 and continue adding the amount of the total of the down days until the market shows an up day. The formula I am now using total the first and second day but does not do a running total count if t...

display changing label caption on form as sub runs w/o screen flic
let's say i have this routine Sub Test label1.caption = "Starting ... " 'do events label1.caption = "Getting there ... " 'do events label1.caption = "Finished! ... " End Sub on my form, i have label1 right in the middle what happens is sometimes the message will change, and then sometimes it wont, or it will show the first one, skip the second and jump to the third etc etc etc so it is inconsistent. is there a way to make sure the label caption displays consistently, on time, wh...

Update subform field from pop-up form
I have a Form with 2 subforms. I need the ability to change the Child Field on the second subform to a value found in a pop-up form. I have the following structure: FrmMain Primary Key: ClientNo FrmSubVisit Record Source: q_frm_sub_visits_active Field 1: Account Field 2: AccDate Link Child Fields: ClientNo Link Master Fields: ClientNo Default View: Continuous FrmSubEvent Record Source: q_frm_sub_events Field 1: Account Field 2: EventNo Link Child Fields: Account Link Master Fields: txtRelayAccount (text relay on FrmMain from frmSubVisit) Default View: Single Form The “Account” on frm...

macro which finds last cell in a column
please help me by telling a macro which finds last cell in a column thank -- Message posted from http://www.ExcelForum.com Dim LastRow as Long LastRow = Range("A65536").End(xlUp).Row or if you just want to select it: Range("A65536").End(xlUp).Select Regards Trevor "vikram >" <<vikram.15hp0w@excelforum-nospam.com> wrote in message news:vikram.15hp0w@excelforum-nospam.com... > please help me by telling a macro which finds last cell in a column > > thanks > > > --- > Message posted from http://www.ExcelForum.com/ > ...

Money 2002 will not run
I had been using Money 2002 for approx. 3 yrs on my home pc (Dell Dim 2100, XP Home Ed. w/SP2). Last year, it simply would not launch. No error message, no splash screen, no app opening, no process listed in Task Manager. Just.... nothing.... The only change that was made to the system since M2k2 last ran was upgrading my a/v solution from Trend Micro PC-Cillin to TM Internet Security. I have tried disabling every aspect of the Internet Security product, as well as completely un-installing the app, and then attempting to run Money, but the same thing (nothing) happens. I was considerin...

Problems with MAPI when publishing outlook forms.
Greetings. I hope to get some help on this issue. Im currently running Exchange 2000 on my server. On my workstation I installed Outlook 2003 and I can create new forms and publish them to the organizational forms library. However - after a while, suddenly I cant publish an edited form. The error I get is "Unable to succesfully publish the form due to a MAPI error. The folder has not been enabled for use while offline" However - im not offline. Im working on the server and I can publish the form in another name. If I save the form to a .oft file and open it in a outlook 2000 - ...

Ways to Start a particular form?
1) I want to automatically open a particular form when the Access file (Access 2007) is opened. I would prefer doing this with a Macro. 2) I would also like to start a particular form what I click on a menu page to open it? Suggestions PLEASE? Question 1 - Create a macro named Autoexec with action OpenForm and the form as argurment. It will run every time Access is opened except when the SHIFT key is held down. Querstion 2 - What kind of 'menu page' do you have? -- Build a little, test a little. "BobC" wrote: > 1) I want to automatical...

Re: Workflow just wont run automatically, i have to run them manually
Yes, but i realized what i was doing wrong. I assumed [bad idea] that if i create a case and hit Save & Close the first time, taht the rule will run. In order for the rule to run automatically, it has to be Save, once it saves it, then Save & Close. Thanks for your reply. "Hi, Did you check the workflow monitor to see if the rules get triggered correctly and complete sucessfully ? Have a nice day, St=E9phane Dorrekens " --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://...

No macros in 2008
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) I thought i was doing the right thing trying to convert to the whole office to Mac's! We run all our invoicing, accounts and stock on excel workbooks. they are now very complex and interlinked. I have automated the whole thing using macro and VBA and i feel right royally stuffed! <br><br><i>understand there is no easy or quick solution from what i have read on the forum. i do find it hard to believe such a useful function is just taken away.</i>&#32;<br><br>Can i run spreadsheets ...

Using forms in a shared powerpoint
Hi, I have a feedback form in a Powerpoint which stores the inputted data in a text file. It works perfectly and does what I want it to. EXCEPT I want to use the same form with a group of users and whenever I try this an error occurs. When they press Submit when someone else has it open a run-time error occurs. Does anyone know if I can get around this or should just give up! This is the kind of thing I am doing: http://cws.internet.com/article/4529-.htm Thanks Maybe try using FreeFile instead od #1? Not sure that even then you can have it open on more that one PC at a ...

Money 2005 & Transaction Form Budget Summary
I have recently upgraded to Money 2005 from 2003 and have noticed that I am missing the little budget/category summary that used to appear at the bottom of the transaction form when I review & categorise downloaded transaction entries in the Account Register. The summary used to show how much of my budgeted amount for that category had been used. Does anyone know how to get the little summary back? Was this functionality removed from Money 2005? I hope not, because I really liked it. Thanks, Tyler Nobody here. Yes. See http://umpmfaq.info/faqdb.php?q=166. "Tyler" <Ty...

Macro to Find, Cut, and Paste
I have 2 LONG columns that I need to make into MANY. I want to find a word in the active column, cut from that word down to the end and the adjacent cells; then paste them at the top of the next column. and do this for all occurences of that word. I'm confused about the two columns. I'm thinking that you want to break up your list of two columns based on the word in column A. But paste both columns to the adjacent columns. So this: $H$1 $B$1 $H$2 $B$2 $H$3 $B$3 $H$4 $B$4 $H$5 $B$5 $H$6 $B$6 $H$7 $B$7 aaaa $B$8 $H$9 $B$9 $H$10 $B$10 $H$11 $B$11 $H...

Pivot tables and macros
i currently use macros to change some downloaded sales information. unfortunately, the volume always changes and I cannot use a macro for creaqting a Pivot table. When i select cell A1 and hit pivot tabel it automatically selcts the range. In my macro it will only select the actual range i recorded. IS there a way to go around that? Thanks Mike You'll have to edit the macro to create a variable range (alt + F11 will bring up the VB Editor). If, for example, your macro recorded the range as "A1:D4200", you'll want to create a variable to capture the final row, th...

Outlook Still Running
I am running XP Pro with Office 2003 Pro and sometimes when I exit out of Outlook, Outlook.exe and Winword.exe stay as processes still running. Does anyone else have this problem and what can do to make sure this does not happen? Thanks for your help -- Neil Remove ABCD from Email address to reply <neil154ABCD@earthlink.net> wrote: > I am running XP Pro with Office 2003 Pro and sometimes when I exit > out of Outlook, Outlook.exe and Winword.exe stay as processes still > running. Does anyone else have this problem and what can do to make > sure this does not happ...

Personal Macro file
How do I stop my Personal Macro file from requesting to be Saved each time I exit Excel? This is very annoying and has just started happening after creating some macros to update data from certain clients. -- Mickey If you put this is a standard module you will no longer be prompted to save changes: Sub Auto_Close() ThisWorkbook.Saved = True End Sub Or alternatively, this in the ThisWorkbook module: Private Sub Workbook_BeforeClose(Cancel As Boolean) Saved = True End Sub Of course, when you do need to save changes, you must remember on your own. -- Jim "Mikey" <...

Very strange problems while running Great Plains on workstations
I notice that a few workstations in an office I support are having problems when they run Great Plains. Excel, Outlook, Word and Dynamics.exe are showing in the Application event log as being Hanging or Faulting. I also see Fault Bucket errors, but when I search online I cannot find any information online. Here is one of the Fault Bucket errors: 3:15:35 pm 28-Sep-06 Application Hang None 1001 N/A Fault bucket 296734104. Also, these workstations are experiencing problems printing PDF files. Has anyone out there seen this behavior and if so, how can these problems be fixed? Thank you, ...

Publisher 2000 will not run
I had problems with Publisher 98 not running which we=20 never did solve so I installed office 2000 to see if=20 Publisher 2000 would function. Same problem: The flash=20 screen pops up and then disappears. No program. Microsoft=AE Publisher 2000 Version 6.0 has encountered a=20 problem and needs to close. We are sorry for the=20 inconvenience. Howard, hi again, Have you tried opening Publisher in safe mode? Publisher retains all printer information within its publications. If you can open Publisher in safe mode, either regress or update your printer and video drivers. -- Mary Sauer MS MV...