How to tell if a form is open

I want to know how to return a value telling me whether or not a form is 
currently open. Something like this pseudo-code:

If Forms![new appointment].Open = True Then
    'send harry a box of chocolates'
End If

Cheers
-- 
Nick
0
Utf
12/21/2007 11:16:01 AM
access.forms 6864 articles. 2 followers. Follow

3 Replies
1220 Views

Similar Articles

[PageSpeed] 29

Assuming Access 2000 or later:
    If CurrentProject.AllForms("new appointment").IsLoaded Then

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nick Heath" <NickHeath@discussions.microsoft.com> wrote in message
news:3541FBC9-3673-448A-B5A6-85E76555A23C@microsoft.com...
>I want to know how to return a value telling me whether or not a form is 
> currently open. Something like this pseudo-code:
> 
> If Forms![new appointment].Open = True Then
>    'send harry a box of chocolates'
> End If
> 
> Cheers
> -- 
> Nick
0
Allen
12/21/2007 11:27:13 AM
that works great thanks, now how do you send a box of chocolates?
-- 
Nick


"Allen Browne" wrote:

> Assuming Access 2000 or later:
>     If CurrentProject.AllForms("new appointment").IsLoaded Then
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "Nick Heath" <NickHeath@discussions.microsoft.com> wrote in message
> news:3541FBC9-3673-448A-B5A6-85E76555A23C@microsoft.com...
> >I want to know how to return a value telling me whether or not a form is 
> > currently open. Something like this pseudo-code:
> > 
> > If Forms![new appointment].Open = True Then
> >    'send harry a box of chocolates'
> > End If
> > 
> > Cheers
> > -- 
> > Nick
> 
0
Utf
12/21/2007 11:43:00 AM
CurrentProject.Chocolates("Truffles").Export

-- 
HTH,
George


"Nick Heath" <NickHeath@discussions.microsoft.com> wrote in message 
news:4625835F-98E9-4FFE-8FF0-43364985D506@microsoft.com...
> that works great thanks, now how do you send a box of chocolates?
> -- 
> Nick
>
>
> "Allen Browne" wrote:
>
>> Assuming Access 2000 or later:
>>     If CurrentProject.AllForms("new appointment").IsLoaded Then
>>
>> -- 
>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "Nick Heath" <NickHeath@discussions.microsoft.com> wrote in message
>> news:3541FBC9-3673-448A-B5A6-85E76555A23C@microsoft.com...
>> >I want to know how to return a value telling me whether or not a form is
>> > currently open. Something like this pseudo-code:
>> >
>> > If Forms![new appointment].Open = True Then
>> >    'send harry a box of chocolates'
>> > End If
>> >
>> > Cheers
>> > -- 
>> > Nick
>> 


0
George
12/21/2007 5:46:14 PM
Reply:

Similar Artilces:

FindRecord2K works perfectly, how to display results in my form
I downloaded the findrecord2k search form. I would like to add a command button that takes those results that are generated from the query and displays them in my form. There are several command buttons available, would it be easier to modify an event to include displaying the search results in my form instead of the unbound control? ...

Unable to open excel file #2
Hi. I have problem openning an excel file from windows explorer or from my desktop. However, when I open the excel program and open a file manually(File-Open----) everything works fine. I get an error message that the file could not be located. I noticed that it adds .xls to every word separated by space. For example: My file is in C:/Shared/Folder/test.xls, it tries to open: C:/Shared.xls then Folder.xls then test.xls Please help. Thanks. --- Message posted from http://www.ExcelForum.com/ Hi! I think the steps below will solve this problem: 1. Exit Excel 2. From the Startmenu, cli...

filtering form with a field not currently in the form
Hello, I have a table with the following fields ManagerLast Name, First Name, Password. In one the forms I created, it has many fields from different tables including the ManagerLast Name field and another field call ManagerApproved, however, not a password field. I would like to create a VBA command so that I have an inputbox where a user will type in his/her password and the form will filter to show only the Manager's Last Name and any ManagerApproved fields where the field equals to "NO". How can I go about doing this? Do I add a text box to the form first with the passwor...

Show data form on file open
Hello everyone, I have a large CSV file I write to a CD. When someone opens the file off of the CD, I would like to have the default data form (from Data/Forms menu item) automatically opened with all fields/criteria clear. Thanks for your advice! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ ...

Shell open Notepad and write text
Hi is it possible to open Notepad and write text and let the user print or /and save the file, I tried using the SendKeys strText, True after opening Notepad but this wont work. Any help would much appreciated. Charles It seems you are having problems puting text into Notepad. Why not write the data as a text file then open the text file with note pad and print. ID = shell("C:\windows\notepad.exe c:\myfile.txt") -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.c...

How to tell what folder an Opened Email is in ?
I use Google Desktop to find emails sometimes. (I have zillions saved in Outlook in various Outlook email folders) When Google Desktop finds the email it lets me open it in Outlook... But... I can't tell what Outlook Email Folder it is in. I could let Outlook search all my email folders but Google Desktop is so much faster. Can anyone tell me how, once an email is open in Outlook, to tell what Outlook folder it is in? thanks for any help. outlook doesn't have any way of showing you that information. It's better to use fewer folders and other mail management features lik...

Dexterity scrolling window link table not on the form
Dear all , I have a dexterity customized form containing a scrolling window and both the form and the scrolling window are link to the same tabel, but after installing the chunk and try to open my form i receive "scrolling window link table not on the form" error message. Thanks for your help. Regards Try the following: One common situation is not attaching the file that the scrolling window is auto-linked to onto the form where the scrolling window resides. Another situation causing the "Link file not found on scrolling window" message to appear may be due to ...

Cannot open files in Word
I cannot open a file in Word saved in publiser. When I try it shows a window encoding, and shows ms- dos and two choices to pick from, no matter what I pick the document cannot be read.Thank for any help Frank Neither can anyone else. A Publisher file cannot be opened in Word. "Frank" <Frank@discussions.microsoft.com> wrote in message news:E348233B-B3F0-4CC9-9606-1640F454A88D@microsoft.com... >I cannot open a file in Word saved in publiser. When I try it shows a >window > encoding, and shows ms- dos and two choices to pick from, no matter what I > pick the doc...

Cannot open attach. within outlook
I am using outlook 2000sr2 on windows NT 4. I am getting a variety of message boxes when I open files. Either: "<file name> is being used by <user>. Do you want to make a copy? (email attachments and Word files) or "A document with the name <x> is already open. You cannot open two documents with the same name, even if the documents are in different folders. To open the second document, either close the document that's currently open, or rename one of the documents." (Excel files). This only occurs when I open the documents directly from email or...

moving from one form to another
I want to be able to move from form 1 to form 2 and retain matching information in form 1 to form 2. So, how do I link the one or two matching information in both the forms? I think what you are asking is how to link forms? If so, in properties for the forms or subforms, go to the data tab and enter your master and child link property. It should create that for you. If the forms are not on the same form (a form and subform) you might have to create a form/subform to link them. If you want to be able to see the same information in each form without linking, you would need to put the inf...

Outlook Freezing tell Exchange service restarted.
Server: Windows NT Small Business Exchange 5.5 SP4 NOTE: The server is also a SQL server, InterBase, and a Norton's Anti-Virus server. Client: Windows 2000 Pro Outlook/Office 2000 Norton's Anti-Virus Problem: About once to twice a week outlook (on all clients 30+) will not connect to the exchange server or outlook is connecting but it's freezing on the client computers. Temp fix: Restart the Exchange service on the server. Dose any one know how to fix the problem so that I don't have to keep restarting the exchange service? I fixed the problem: I stopped the Microsoft Lic...

A realtion from one form to the same form?
Hi all, In a database of mine I've made a form where my users are going to register persons. There are many fields in the form, among them autonumber, name, address, phone numbers and so on. There is also a field into which they shall put the autonumber given to the person's wife or husband who have allready been registered in the form. I want the form to show name the wife or husband when her or his autonumber is put into the right field. But I wonder how do I do this? As I see it I need a one-to-many relation from the autonumber field in the table to the wife-or-husband fiel...

Form Header and Footer Not Being Displayed
Access 2007. I have a form that I just changed to show the form header and footer they show up in design view but don't appear in form view. JamesJ wrote: > Access 2007. > I have a form that I just changed to show the form header and footer > they show up in design view but don't appear in form view. You probably used "Page" header/footer instead of "Form" header/footer. The former is only used for printing. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com You'r right. I should wait for the...

Update textbox on form
The following are events on two combo boxes on a subform "NewJobsSubform", the first sets the rowsource of the second and also sets a default value in the second. The second event sets the value in the text box "Sell" to the price associated with the RepProduct in cboRepProduct - collected from the table "RepairProducts". "Private Sub cboCatName_AfterUpdate() On Error Resume Next Me.cboRepProduct.RowSource = "SELECT RepairProduct.RepProduct FROM" & _ " RepairProduct WHERE CatName = '" & Me.cboCatName.Value...

Who could tell me?
Hello all: I create a single document,and it is running ,and now I want to get some information on it through another application, except hWnd for CView and CFrameWnd what I could get some information for CDocument and CWinApp?Thanks. As far as running slow, it would be extraordinarily difficult to say what that is given that you haven't even told us what is "running" or "slow". You cannot access CDocument, CWinApp, or any other object from another application. Applications run in completely different memory spaces and, even if you passed a pointer, it would...

Form C++ Forum
Which forum should I post requests to for c++ form info. Investigation forms server in c++ and have the sample working but which to ask some design questions - should I post here?? Answers on a post card please :o) There is a newsgroup specifically for general Outlook programming issues = "down the hall" at microsoft.public.outlook.program_vba or, via web = interface, at = http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso= ft.public.outlook.program_vba Or if you're building an Outlook add-in use = microsoft.public.outlook.program_addins --=20 Sue ...

if this pay, please tell me .hope not swindle!
http://richptr.net/pages/index.php?refid=websp ...

Creating a Search Form
I have a simple address book spreadsheet. I would like to create a Search form, where the user can enter the Last Name of the person they are searching for. Hi Karen two inbuilt options that you might like to have a look at as long as your data is in "database / list" format ie something like ..........A..............B.....................C......................D 1.....First Name...Last Name.....Address.........Town. 2.....Joe..............Bloggs............15 North Rd.....Little Parks click in cell A2 choose data / filter / autofilter - you'll see a drop down arrow f...

previous working Excel file cannot longer be opened
A spreadsheet (96kb *.xls file-using Microsoft Works 6) was previously working and saved in drive A. It was succesful retrieved several times but since the last time it was saved, it cannot be opened any longer. @ the time that I tried to open it the system frozen. I tried to repair the file using the Windows inbox repair tool. Now, I get the message that the file was created with an unknown application. A *.bak file was created by the repair application. How the file can be restored?. Thanks. Hi NEVER open a file directly from a floppy disc. This could lead to corrupted files. Your...

using word 2007 as email form in outlook 2002
I can't get outlook 2002 to use my new word 2007 as the default email form. I was using word 95 and my outlook used it. I tried to tell outlook to use word 2007 but it keeps trying to configure word 2007 but I end up right back at the html format. what give here? Outlook doesn't know where to find word (it's no longer in /office/ but /office12/), but I don't think it will work if you do a custom install of word into the office directory. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center...

Table in custom form
Hi, Is there anyway to place a table in a form? Thanks for the help in advance, dan Yes, but the details depend on ... the details of what you have in mind, = whether you want a table in the item body or something table-like on the = form surface.=20 FYI, there is a newsgroup specifically for Outlook forms issues "down = the hall" at microsoft.public.outlook.program_forms or, via web = interface, at = http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso= ft.public.outlook.program_forms --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outloo...

open CSV.file
I have a lot of csv file, in that file the date column contain both text and date values, but when i change my system settings to UK and if i manually change the date format using custom type "dd-mmm-yy", all the date and text value of that column will easily change to dd-mmm-yy, but when i created a macro to do the same thing, the problem iam facing here is when it open each csv files the date is getting changed(the column contains both text and date values) when i open the file using the below code it opens the file in a actual format(date values will not change...

Attachments and messages remain open.
I have one user experiencing this problem in Outlook 07 Sp1. She'll open an attachment or an Outlook mail Message saved on the network -- and the first time she opens it, it'll open fine. Then she closes it by clicking the 'X', and it's no longer visible. However, then if she tries to open it again, forward the message, or anyone else tries to open the file on the network -- it claims that she still has the file open. Any thoughts on the issue causing this? Thanks ...

Data entry form
Hi, I wonder if there is possibility to make list field interactive, like when user put firs letter then form showing resluts where first letter = "user letter" ? Becouse I have over 800 records and it is very dificult for user to find the one is looking for. regards Peter Piotr This macro will do what you want. This is how it works. When the user puts a character, say c, in B1, the entire sheet will scroll automatically to put the first row that starts with a "c" at the top of the screen. Note that this is a sheet macro and must be placed in the sheet module ...

Open Password PRotect Excel file from ASP
I am doing my MCA project from Chennai . I need to import data fro excel to Oracle . But the source excel files are workbook and workshee protected . I am not able to open the files even if I try to unprotec them . Can u please find out the way or a solution ? my email id i hsinha80@rediffmail.co -- Message posted from http://www.ExcelForum.com ...