locking up

This might be more of a GDI question, but since I'm in MFC, I'll ask:

Would BitBlt-ing to the screen repeatedly tend to lock up a program, after 
alt+tabbing to another application?  If so, why?  This seems to be happening 
to me, and I want to get to the bottom of the problem.  What I have is 
either a fade loop or a screen-size redraw, both based on a timer and 
bitblt.  Quite often, after I leave the program to go to another app, I 
cannot return and must "end task". 


0
srussell2458 (497)
12/7/2005 12:11:12 AM
vc.mfc 33608 articles. 0 followers. Follow

8 Replies
1567 Views

Similar Articles

[PageSpeed] 15

"Steve Russell" <srussell@removethisinnernet.net> wrote in message 
news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>
> Would BitBlt-ing to the screen repeatedly tend to lock up a program, after 
> alt+tabbing to another application?  If so, why?  This seems to be 
> happening to me, and I want to get to the bottom of the problem.  What I 
> have is either a fade loop or a screen-size redraw, both based on a timer 
> and bitblt.  Quite often, after I leave the program to go to another app, 
> I cannot return and must "end task".
 - - -
I should clarify that both involve GetClientRect and the entire available 
draw area. 


0
srussell2458 (497)
12/7/2005 12:20:11 AM
How confident are you of your GDI code? It sounds as if there could be a 
resource leak.



"Steve Russell" <srussell@removethisinnernet.net> wrote in message 
news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>
> Would BitBlt-ing to the screen repeatedly tend to lock up a program, after 
> alt+tabbing to another application?  If so, why?  This seems to be 
> happening to me, and I want to get to the bottom of the problem.  What I 
> have is either a fade loop or a screen-size redraw, both based on a timer 
> and bitblt.  Quite often, after I leave the program to go to another app, 
> I cannot return and must "end task".
> 


0
M
12/7/2005 12:30:33 AM
Define "lock up"...there are various interpretations of this phrase, including "nothing
seems to draw" which usually translates as "GDI resource leak".

The use of GetClientRect on the entire available draw area is almost certainly irrelevant.

One thing to try is to attach a debugger (or be running under the debugger), and do a
break to see where you are running.  Then, try single-stepping (note that if you are in a
paint handler, you have to make sure the VS running the debugger does not in any way
overlap any of the window being drawn, or you won't be able to effectively debug).
				joe

On Tue, 6 Dec 2005 19:20:11 -0500, "Steve Russell" <srussell@removethisinnernet.net>
wrote:

>"Steve Russell" <srussell@removethisinnernet.net> wrote in message 
>news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
>> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>>
>> Would BitBlt-ing to the screen repeatedly tend to lock up a program, after 
>> alt+tabbing to another application?  If so, why?  This seems to be 
>> happening to me, and I want to get to the bottom of the problem.  What I 
>> have is either a fade loop or a screen-size redraw, both based on a timer 
>> and bitblt.  Quite often, after I leave the program to go to another app, 
>> I cannot return and must "end task".
> - - -
>I should clarify that both involve GetClientRect and the entire available 
>draw area. 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
12/7/2005 10:16:14 PM
Thanks, Joe.  By "lock up" I mean that the only thing left visually of my 
program is the icon in the taskbar.  The window does not reappear, once I 
have switched to another application and then try to return.
----------------
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:6hnep1hfbi7qnch46rcpb1j50p184a44o0@4ax.com...
> Define "lock up"...there are various interpretations of this phrase, 
> including "nothing
> seems to draw" which usually translates as "GDI resource leak".
>
> The use of GetClientRect on the entire available draw area is almost 
> certainly irrelevant.
>
> One thing to try is to attach a debugger (or be running under the 
> debugger), and do a
> break to see where you are running.  Then, try single-stepping (note that 
> if you are in a
> paint handler, you have to make sure the VS running the debugger does not 
> in any way
> overlap any of the window being drawn, or you won't be able to effectively 
> debug).
> joe
>
> On Tue, 6 Dec 2005 19:20:11 -0500, "Steve Russell" 
> <srussell@removethisinnernet.net>
> wrote:
>
>>"Steve Russell" <srussell@removethisinnernet.net> wrote in message
>>news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
>>> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>>>
>>> Would BitBlt-ing to the screen repeatedly tend to lock up a program, 
>>> after
>>> alt+tabbing to another application?  If so, why?  This seems to be
>>> happening to me, and I want to get to the bottom of the problem.  What I
>>> have is either a fade loop or a screen-size redraw, both based on a 
>>> timer
>>> and bitblt.  Quite often, after I leave the program to go to another 
>>> app,
>>> I cannot return and must "end task".
>> - - -
>>I should clarify that both involve GetClientRect and the entire available
>>draw area.
>>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
srussell2458 (497)
12/8/2005 5:49:46 AM
Thanks, Joe and "M".  I was probably deleting a particular object, that 
calls GDI functions, a bit too late in the BitBlt cycles.  Now, instead of 
locking up, the program stops, so I'll look elsewhere for that problem.
----------------
"M" <a@b.com> wrote in message 
news:OEeazVs%23FHA.3340@TK2MSFTNGP12.phx.gbl...
> How confident are you of your GDI code? It sounds as if there could be a 
> resource leak.
>
>
>
> "Steve Russell" <srussell@removethisinnernet.net> wrote in message 
> news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
>> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>>
>> Would BitBlt-ing to the screen repeatedly tend to lock up a program, 
>> after alt+tabbing to another application?  If so, why?  This seems to be 
>> happening to me, and I want to get to the bottom of the problem.  What I 
>> have is either a fade loop or a screen-size redraw, both based on a timer 
>> and bitblt.  Quite often, after I leave the program to go to another app, 
>> I cannot return and must "end task".
>>
>
> 


0
srussell2458 (497)
12/9/2005 2:23:53 AM
Now I notice that Windows screensaver also stops my program.  I am bitblting 
to the entire screen on a timer every several seconds.  Any further thoughts 
on this, before I try to track down the bug?
------------
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:6hnep1hfbi7qnch46rcpb1j50p184a44o0@4ax.com...
> Define "lock up"...there are various interpretations of this phrase, 
> including "nothing
> seems to draw" which usually translates as "GDI resource leak".
>
> The use of GetClientRect on the entire available draw area is almost 
> certainly irrelevant.
>
> One thing to try is to attach a debugger (or be running under the 
> debugger), and do a
> break to see where you are running.  Then, try single-stepping (note that 
> if you are in a
> paint handler, you have to make sure the VS running the debugger does not 
> in any way
> overlap any of the window being drawn, or you won't be able to effectively 
> debug).
> joe
>
> On Tue, 6 Dec 2005 19:20:11 -0500, "Steve Russell" 
> <srussell@removethisinnernet.net>
> wrote:
>
>>"Steve Russell" <srussell@removethisinnernet.net> wrote in message
>>news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
>>> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>>>
>>> Would BitBlt-ing to the screen repeatedly tend to lock up a program, 
>>> after
>>> alt+tabbing to another application?  If so, why?  This seems to be
>>> happening to me, and I want to get to the bottom of the problem.  What I
>>> have is either a fade loop or a screen-size redraw, both based on a 
>>> timer
>>> and bitblt.  Quite often, after I leave the program to go to another 
>>> app,
>>> I cannot return and must "end task".
>> - - -
>>I should clarify that both involve GetClientRect and the entire available
>>draw area.
>>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
srussell2458 (497)
12/9/2005 1:25:26 PM
Aha -- I was deriving some of my supporting values from GetClipBox. 
Therefore, when the the window was not visible, I had zero values that would 
not increment and thus the lockup.  Thanks again, gentlemen.
---------------
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:6hnep1hfbi7qnch46rcpb1j50p184a44o0@4ax.com...
> Define "lock up"...there are various interpretations of this phrase, 
> including "nothing
> seems to draw" which usually translates as "GDI resource leak".
>
> The use of GetClientRect on the entire available draw area is almost 
> certainly irrelevant.
>
> One thing to try is to attach a debugger (or be running under the 
> debugger), and do a
> break to see where you are running.  Then, try single-stepping (note that 
> if you are in a
> paint handler, you have to make sure the VS running the debugger does not 
> in any way
> overlap any of the window being drawn, or you won't be able to effectively 
> debug).
> joe
>
> On Tue, 6 Dec 2005 19:20:11 -0500, "Steve Russell" 
> <srussell@removethisinnernet.net>
> wrote:
>
>>"Steve Russell" <srussell@removethisinnernet.net> wrote in message
>>news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
>>> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>>>
>>> Would BitBlt-ing to the screen repeatedly tend to lock up a program, 
>>> after
>>> alt+tabbing to another application?  If so, why?  This seems to be
>>> happening to me, and I want to get to the bottom of the problem.  What I
>>> have is either a fade loop or a screen-size redraw, both based on a 
>>> timer
>>> and bitblt.  Quite often, after I leave the program to go to another 
>>> app,
>>> I cannot return and must "end task".
>> - - -
>>I should clarify that both involve GetClientRect and the entire available
>>draw area.
>>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
srussell2458 (497)
12/10/2005 2:02:32 PM
Screensavers often run in a separate desktop, so whatever you are doing to your main
desktop becomes irrelevant if the screensaver is up.
				joe

On Fri, 9 Dec 2005 08:25:26 -0500, "Steve Russell" <srussell@removethisinnernet.net>
wrote:

>Now I notice that Windows screensaver also stops my program.  I am bitblting 
>to the entire screen on a timer every several seconds.  Any further thoughts 
>on this, before I try to track down the bug?
>------------
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:6hnep1hfbi7qnch46rcpb1j50p184a44o0@4ax.com...
>> Define "lock up"...there are various interpretations of this phrase, 
>> including "nothing
>> seems to draw" which usually translates as "GDI resource leak".
>>
>> The use of GetClientRect on the entire available draw area is almost 
>> certainly irrelevant.
>>
>> One thing to try is to attach a debugger (or be running under the 
>> debugger), and do a
>> break to see where you are running.  Then, try single-stepping (note that 
>> if you are in a
>> paint handler, you have to make sure the VS running the debugger does not 
>> in any way
>> overlap any of the window being drawn, or you won't be able to effectively 
>> debug).
>> joe
>>
>> On Tue, 6 Dec 2005 19:20:11 -0500, "Steve Russell" 
>> <srussell@removethisinnernet.net>
>> wrote:
>>
>>>"Steve Russell" <srussell@removethisinnernet.net> wrote in message
>>>news:%23YFL5Ks%23FHA.360@TK2MSFTNGP09.phx.gbl...
>>>> This might be more of a GDI question, but since I'm in MFC, I'll ask:
>>>>
>>>> Would BitBlt-ing to the screen repeatedly tend to lock up a program, 
>>>> after
>>>> alt+tabbing to another application?  If so, why?  This seems to be
>>>> happening to me, and I want to get to the bottom of the problem.  What I
>>>> have is either a fade loop or a screen-size redraw, both based on a 
>>>> timer
>>>> and bitblt.  Quite often, after I leave the program to go to another 
>>>> app,
>>>> I cannot return and must "end task".
>>> - - -
>>>I should clarify that both involve GetClientRect and the entire available
>>>draw area.
>>>
>> Joseph M. Newcomer [MVP]
>> email: newcomer@flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
12/12/2005 3:37:31 PM
Reply:

Similar Artilces:

Set AD account to never lock out?
Hi, Is it possible to make an AD account never lock out like the admin user account? Thanks Hello Whiteford, Configure the Account lockout settings so the domain accounts wan't lock. Basically the Administrator also will lock, but it automatically unlocks so you wan't realize it and AFAIK this cannot be done for other accounts. Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. ** Please do NOT email, only reply to Newsgroups ** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mu...

Publisher 2002 locked file
I've a 12 user network running Publisher 2002 on Xp Pro PC's and a 2003 Server. When one user opens a document none of the others can open the same shared file on the network. It says that the file is locked because another program is using it. Can't find any reference to this message in the Knowledge Base or anywhere else. Don't have this problem with sharing Word or Excel files as these give the user the option to open the file read only, which is fine. Are there any reasons or restrictions in Publisher that may be causing this problem? As a work-around I can save th...

Lock pages in memory greyed out
I am trying to give the ability to a user to "Lock pages in memory" via local policy, and for some reason it's greyed out. I can't change this and it is needed on a version of our software running on SQL standard 2008 64. I've tried all of the ways listed on the internet but it's continued to be greyed out. Any info on how to get this to allow for a user to be placed there to do what I need done would be appreciated. Thank you in advance, Jason Check to see what group policy is being applied. Jason Woodbury wrote: >I am trying to give the a...

How to lock or pdf part of a flier
I'm making fliers for my business. I need to make part of the flier change able and lock the rest. Any suggestions There's no feature for this purpose in Publisher. The only suggestion I can offer would be to put what you want "locked" on the Master Page & the rest of the content as usual. AFAIK, even professional PDF editors (Adobe Acrobat) don't provide the capability either. If the nature of your flier can be handled by Word's more restrictive layout capabilities you may be able to protect the document on a section-by-section basis. Regards |:>) Bob Jo...

Locking content, formula, and format in a cell
Is there anyway to lock the content, format, and formula -separately or jointly- of a given cell? If so, how Hi, Protecting the sheet, but first you have to ensure Protection in the cell is set up to locked go to the cell, right click on the mouse, format cell, protection, check Locked box, then protect your sheet. Nobody will be able to do anything in that cell just read it "Jess" wrote: > Is there anyway to lock the content, format, and formula -separately or > jointly- of a given cell? If so, how While content and formula are treated the same, you can f...

Lock sheets automatically
Hi everyone, I have 26 fortnightly timesheets in a workbook for every staff and would like to lock each timesheet after some days.Can you please help me to fix my code as the follows: Select Case s_worksheet Case "TS1", "TS2", "TS3" If (DateDiff("d", B12, Date) > 6) Then s_worksheet.Unprotect "admin" s_worksheet.Range("C6:C12,D6:D12,F6:F12,G6:G10,H6:H10,I6:I10").Locked = True s_worksheet.Protect "admin" End If Case Else: End End Select Man...

Preserving lock on cells even when copied and pasted within a sheet
(Sorry for repeating this post from another group; I inadvertently neglected adding both groups in my original post in microsoft.public.excel.misc. In any case, I found a couple of minor errors and omissions that I have corrected :-P.) Hi, I am trying to create a *protected* worksheet that is flexible enough so that additional rows can be created (by copying existing rows from above) if additional data becomes available to be entered. Locking rows with formulas and protecting the sheet does allow the user to copy and paste the cells or rows (most often accomplished by dragging by the handl...

locking one field
I have a quality database with a field for a managment approval. Is it possible to lock a field so that only certain people can access it? Will I have to set up users? Assuming you are using an MDB (not an ACCDB in A2007), you can set up users and specify permissions on a per-table basis. JET cannot handle column-level permissions, so the simplest way to do it is to create another table (related one-to-one to your existing one), and put the sensitive field(s) in there. If you want to do it through the Access interface without setting up permissions, this might help: ht...

opening *.mdi files MODI locks up mouse
When I perform the following: Remote Desktop to Windows 2008 x64 and open up an MDI file - Microsoft Office Document Imaging (MODI) format - the mouse locks up and stops moving inside the RDP session. The keyboard still works but to get the mouse working again, you need to log off. This was duplicated on multiple PCs. Looks like uninstalling "Desktop Experience" fixes this problem "Kublakan" wrote: > When I perform the following: Remote Desktop to Windows 2008 x64 and open up > an MDI file - Microsoft Office Document Imaging (MODI) format - the mous...

Single Step InPut Box Locks Up Excel
From time to time I have an Input Box pop up that I did not request. When this happens, XL locks up and I have to reboot. Any help will be greatly appreiated. The box looks like this: ----------------------------------------------------------- Single Step | -----------------------------------------------------------| Cell: | Formula: | | -----------------------------------------------------------| Step Info ...

locking a field in a form
Hello, I want to be able to lock a field but still allow the user to enter NEW data into the field in the form. (In other words, allow users to enter new data into a particular field of a form but not change existing data in that field). If I lock the field in the properties sheet, the data can't be edited, which is good, but you can't enter new data either, which defeats the purpose of the form. Is there a way to do this? Thanks, Debbie Yes, use the form's Current event: With Me If .NewRecord Then .txtSomeControl.Enabled = True .txtSome...

Lock the position/dimension of a textbox in publisher
Hi, I have publisher 2003 and I want to create a form that will need to be filled (by another user) with text and pictures. The thing is, I don't want the layout of the document to be changed. Is there a way to do that (VB or else?). Thanks ...

Locking a format
How do I lock the format but still allow a user to input values into a cell? I have cells that are unlocked to allow for operator entry but if the operator copies and pastes from another spreadsheet, the format I've set up changes to whatever the copied and pasted cell had. thanks Irie! ...

some keys locked on keyboard. How do I unlock it?
Some keys on my keyboard is locked in Exel. How do I unlock it? "Dalene" <Dalene@discussions.microsoft.com> wrote in message news:F12F0DC0-7689-4618-8518-88C4C7335B99@microsoft.com... > Some keys on my keyboard is locked in Exel. How do I unlock it? I don't understand what you mean. Doesn't anything happen when you press these keys? Do these keys work in other applications like MS Word? /Fredrik Which keys and when does it happen? One workbook or all workbooks? Is scroll lock key enabled? Have you checked if perhaps you have Transition Navigation Keys enabl...

MS outlook 2000 locks up when synchronizing forms
When a user running Win XP w/ 512 MB of RAM closes outlook, offline files synchronize. During 'synchronizing forms' stage, Outlook locks up 80% of the time. The user has to use ctrl-alt-del to kill the program. I've updated office to the latest updates (SP3). I've updated windows to the latest updates. I've ran disk cleanup and a detect and repair on outlook. The problem continues. Any ideas? I have found exactly the same, although this is on a system with 1Gb RAM. On restarting Outlook after a lockup of this type, the app takes ages to load (typically 60-90 seconds, in...

Excel has the NUM lock key on
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) How do I turn off the NUM lock key so that Excel will recognize date and other fields as text and not numbers. Thanks. In article <59bb288a.-1@webcrossing.JaKIaxP2ac0>, bethe@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.5 (Leopard) > > How do I turn off the NUM lock key so that Excel will recognize date and > other fields as text and not numbers. Thanks. It has nothing to do with NUMLOCK. Select the cells of interest and grab the Menu Format/Cells and navigate t...

e-mail is locked or down for maintenance, what to do?
I received an error message: Microsoft Office Outlook is locked or down for maintenance. unable to access mail for two days. How do I unlock or what is to be done Is this a work account? If yes, then ask your mail admin. --� 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 furious head scratching, La Condesa asked: | I received an error message: Microsoft Office Outlook is locked or | down for maintenance. unable to ...

record Locking multi user
Hi I have a multi-user Access 2003/2007 database. In mono user mode everything works fine, but in multi user mode there seems to be occasionally a Conflict message giving the users to either Save Record, Copy to Clipboard or Drop Changes. I open my tables something like: Public Function OpenTable(strTableName As String) As DAO.Recordset On Error GoTo FoutOpenTable Set ws = DBEngine.Workspaces(0) Set db = DBEngine.Workspaces(0).Databases(0) Set OpenTable = db.OpenRecordset(strTableName, dbOpenTable) ExitFoutOpenTable: Set db = Nothing Exit Function FoutOpenTable: MsgBox &q...

Password locking one row and colum containing formula
To stop "nuisence experts" changing my spreadsheet formula (haven't we all met these people!!) I want to secure one row of cells and one column of cells whilst leaving the remaining worksheet accessable for data entry. I can lock the whole worksheet but have got bogged down trying to just secure (with Password) the cell and column containing the worksheet formula. Hi John All cells are Locked by default, which only becomes invoked when you Protect the sheet. So, select the range of cells from B2 to wherever you want, Format Cells>Protection>untick locked. Tools>...

Email flashes rapidly and pc locks up
MS Office Professional, Outlook 2002 SP3 - Occasionally when I try to forward or copy a received email, the body of the email flashes continuously and the pc locks up. I must use task manager to end the process. Why does this happen/how to fix? ...

Outlook locks when using mail recipient
Hi I'm using O'03. When I right click on a file & use Send To> Mail Recipient it displays the email window but locks the main Outlook window. I can't select any of the messages or folders etc. or even move it. If I close the email it unlocks & everything is fine. Is there a way to prevent this from happening or even an alternative way to email a file by right clicking it? TIA Dave F. PS This message has been cross-posted to other relevant NG's to obtain the most accurate answer. No, you can't do anything to change it, other than save and close, then re...

Freeze Window
Is there any way to protect or lock a "freeze window" setting so that others can't unfreeze the window, change the rows, and re-freeze the window, thereby making other rows visible? I hope this question is clear. My spreadsheet is password-protected, but users have been changing the spreadsheet's "freeze view" as described above. TIA Hi! Depend on it: Excel is not proof against anyone with a modicum o skill, guile or sheer bloody-mindedness. On way of slowing their progress through your pitfalls, mantraps an other blocks is to limit movement on the visible s...

Excel Cell Protection / Locking Problem
Is there a way to protect formulas in a sheet (that is, locking certai cells and protecting the sheet) while still enabling users to add line in unlocked areas of the sheet? I am trying to develop a price quoting form where the user can ad extra lines (if additional line items are added) while I keep th structure of the sheet (formulas that total columns, calculate tax an so forth) intact. I have a feeling that once I protect a sheet, I am foreclosed fro adding line no matter what. Thanks -- Message posted from http://www.ExcelForum.com have you used Data Validation? This restricts wha...

Lock a Chart in Place
Is there a way to lock a chart location in place when creating it in the actual worksheet versus putting it a separate worksheet? Similar to word where you can freeze the object in place. Thanks in advance. ...

how to display a message when current record is locked?
how can I put a message when current record is locked? sometimes users don't realise that the record is already being used so I think that a message alerting them was perfect. How can i do this? Regards, Marco Marco, What method are you using to "Lock" the record? If some property, or form value, denotes "locked", the use the OnCurrent event of the form to examine that property or value, and post the Locked message when applicable. Ex. OnCurrent (aircode, using a form value) If Me.LockStatus = "Locked" Then ' MsgBox ...