Check if Shift Key Pressed On Start Up

How can I check if the shift press was pressed at startup?

In my form, I want to check if the shift key was pressed when the MDB
was started--because that would it is being ran in development mode.
In this case, certain code within the form should not run.

Thank you.

0
nullGumby
4/2/2007 7:38:53 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
1602 Views

Similar Articles

[PageSpeed] 42

nullGumby wrote:
> How can I check if the shift press was pressed at startup?
>
> In my form, I want to check if the shift key was pressed when the MDB
> was started--because that would it is being ran in development mode.
> In this case, certain code within the form should not run.
>
> Thank you.

In your nomal startup code set a public variable.  If that variable is NOT 
set then you know that the startup code didn't run.

-- 
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com


0
Rick
4/2/2007 8:23:11 PM
On Apr 2, 3:23 pm, "Rick Brandt" <rickbran...@hotmail.com> wrote:
> In your nomal startup code set a public variable.  If that variable is NOT
> set then you know that the startup code didn't run.

Thanks for the reply.

Yeah, that's the method I was going to take--but was hoping to do
something that I wouldn't have to change every time I wanted to switch
modes.

The elaborate: my form ("fdlgMain") is loaded on start up via settings
on the "Startup..." dialog.  In the "Form_Unload" event, I have
"Application.Quit".  If I'm in development mode, I don't want Access
to end just because I'm closing the form.

I was hoping there would be a way to check--like there's a way to
check command-line parameters.  Again, thanks for the response though.

0
nullGumby
4/2/2007 8:35:59 PM
nullGumby wrote:
> On Apr 2, 3:23 pm, "Rick Brandt" <rickbran...@hotmail.com> wrote:
>> In your nomal startup code set a public variable.  If that variable
>> is NOT set then you know that the startup code didn't run.
>
> Thanks for the reply.
>
> Yeah, that's the method I was going to take--but was hoping to do
> something that I wouldn't have to change every time I wanted to switch
> modes.
>
> The elaborate: my form ("fdlgMain") is loaded on start up via settings
> on the "Startup..." dialog.  In the "Form_Unload" event, I have
> "Application.Quit".  If I'm in development mode, I don't want Access
> to end just because I'm closing the form.
>
> I was hoping there would be a way to check--like there's a way to
> check command-line parameters.  Again, thanks for the response though.

For stuff Like that I usually do things like...

Test if the user is "me".
Test if the file extension is MDB versus MDE.
Test if the local system is my computer.

-- 
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com



0
Rick
4/2/2007 9:11:17 PM
Reply:

Similar Artilces:

Bank Rec void check date s/b same as GL void date
When voiding a check in the payables management module and the Void date and Posting date are changed from the original check date, Bank reconciliation should recognize that void date instead of the original check date as the voided date. Please refer to Knowledgebase Article 857704 to see how Ban Rec handles the date of a void check. If a check is voided in Payables Mgmt on a different date than the original date, and bank rec uses the original date trying to reconcile to the general ledger is a problem because the adjusted bank book balance is different than the GL balance becuase th...

To type I need to depress keys for twice as long as usual. Why?
Having inadvertently depressed a "shift" key for longer than 6 seconds, I have created a problem with typing. To type I need to depress the keys for about twice as long as usual, with an associated sound as well. I can temporarily correct this by depressing the shift key again for longer than 6 seconds but I need to make the correction more permanent. How do I do this? This is a Windows thing, not specifically Word. Go to Start menu > Control Panel > Accessibility Options (or in Vista or Windows 7, Ease of Access Center). Turn off Filter Keys. To prevent it from ...

Check Reprinting
There are times when AP or Payroll checks are sent to the printer, the Printer jams or for some reason GP stops printing. I am trying to find the best way to handle this. For example. if I am sending 200 checks in my check run and say they start at check number 1 and the printer jams on check number 50. In this case if try to reprint checks from 51 to 200 - GP voids checks numbers 51 to 200 and requires that the next check number should be 201. This means I have to void/trash 150 perfectly good checks. Is there any way to reprint them without the GP "voiding" the checks. T...

Boot-start of system driver(s) failed to load
My event log keeps showing error 7026, The following boot-start or system start driver(s) failed to load ftsata2. Could someone please help me with this? ...

How to make MSO close the imap connection after checking mail?
Hi, My server does not allow "idle" connections, and therefore the connection to Microsoft Outlook is closed after a while. I then get a error-message from MSO. How can I make Microsoft Outlook close the connection itself after checking mail? (and thereby I will not get that error?) Regards, ´┐Żystein Larsen ...

Start over?
I keep having to add an adjustment each month to get account to balance. I cannot find my accounting error. Since my Money 2006 balance does not match the banks, I am thinking about archiving the account and starting over. Does anyone have a better suggestion, please. Dazed and Confused In microsoft.public.money, The Weaze wrote: >I keep having to add an adjustment each month to get account to balance. I >cannot find my accounting error. Since my Money 2006 balance does not match >the banks, I am thinking about archiving the account and starting over. >Does anyone have...

Can't start Money: Error on file "mnyob99.dll"
My OS is WinXP Home Ed. I just bought Money 2004 Standard. After installation, I tried to start the application but an error occured and shut it down. Error Msg: AppName: msmoney.exe AppVer: 12.0.0.613 ModName: mnyob99.dll ModVer: 12.0.0.613 Offset: 000dc6e5 Does anyone know how to overcome this? Thanks. Patrick Try the instructions in the article below to Modify the Shortcut: http://support.microsoft.com/default.aspx?scid=kb;en-us;181008&Product=mny "Patrick" <cwt@idirect.ca> wrote in message news:03f101c3b253$ddb65690$a501280a@phx.gbl... > My OS is WinXP ...

Start a file at a defaulted worksheet/cell?
Howdy, Having a few users to a file, can I have the file open to a default worksheet/cell as I have directions I want them to read before playing... Regards, Kevin Kevin, use something like this, put in thisworkbook code Private Sub Workbook_Open() Sheets("Sheet2").Select Range("C3").Select End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "...

Option to select printer B4 printing Payables Checks
Client recently upgraded from 7.5 to 9.0 and they lost the option to select a printer after clicking print. From print payables checks In 7.5 when they would click on print, a window would pop up and give them the option to select a printer to send their checks to. Now it automatically goes to their defaulted printer. How do they set up the option in 9.0? Go to the Named Printers settings, and look at the checkbox to suppress the printer dialog box. This should solve your problem Best regards Mike "TROOTBMI" <TROOTBMI@discussions.microsoft.com> wrote in message news:...

Checking cell for Number
I have about 200 numbers in column A. I would like to enter any number in Column B. In column C I would like, it to show if the number is used or free. can this be done with a if statement? Thanks Try... =IF(COUNTIF($A$1:$A$200,B1),"Used","Free") If you have a list of numbers in Column B that you'd like to check, enter the above formula in C1, and copy and paste the formula to your other cells in Column C. Hope this helps! In article <E5CA9196-6FCF-492C-B488-1B7E431720CF@microsoft.com>, Lee <Lee@discussions.microsoft.com> wrote: > I have abou...

Can XIRR start with a "0" in the first period
I am having issues calculating XIRR. When my first cash flow is 0, I get an error message, even though a regular IRR calc allows a 0 in the first period. Is this just the way XIRR works or is there a way I can get around it? Thanks for you help. carlsondaniel@gmail.com wrote: > I am having issues calculating XIRR. When my first cash flow is 0, I > get an error message, even though a regular IRR calc allows a 0 in the > first period. Is this just the way XIRR works or is there a way I can > get around it? This appears to be a defect in the XIRR algorithm. As you noted, IRR wo...

Function Keys in Excel
Can someone please tell me what the F2 key does in Excel 2000? I have a column of data which has been copied from Access 2000 into an Excel 2000 sheet. It is numeric data and when I use the "Countif" function on this data, it doesn't calculate. However, if I press the "F2" function key in any of the cells, something happens to the data so that the "countif" function recoginises it. Can anyone explain what is happening here? Thank you. -- LPS F2 allows you to edit directly in the cell, do you have calculations set to automatic under tools>calcul...

MS Outlook will not start
Unable to display the folder. Microsoft Outlook could not access the specified folder location. The .DLL file for the information service could not be found. MAPI was unable to load the information service PSTPRX.DLL. Be sure the service is correctly installed and configured. Recreate your mailprofile in Control Panel-> Mail-> button Show Profiles... -- Roady [MVP] www.howto-outlook.com Tips of the month: -Creating Signatures -Create an Office XP CD slipstreamed with Service Pack 3 ----- "Damian ten Bohmer" <damiantenbohmer@iprimus.com.au> wrote in message news:...

Checking a folder for new email
Hi, We have a process that sends an email for every message that is processed (3rd party app). This app dies every now and then and the only way we have to find out about it is that we do not receive emails. Is there a way I can have a scrip that runs on my PC that checks every 15mins for emails in this folder? and then, if the oldest email in the folder is older than 2h seen an alert, popup, email or something? Thanks. George. Am Wed, 10 May 2006 15:28:33 -0400 schrieb George Lake: You can use a task reminder. Each time the reminder fires, add 15 minutes to the reminder time with th...

Enter key will no longer return to begining of next row
From one worksheet to the next, the enter key will only activate the cell directly below the current cell. What Have I done to change the direction? Have checked the direction selection in Options and as suggested by MS Help made sure the Down was selected. Doesn't change a thing. Help! Sandy look in Tools | Options | and on the Edit tab check what's in "Move selection after Enter" Regards Trevor "Sandy" <anonymous@discussions.microsoft.com> wrote in message news:212b01c3e06b$ac7afe50$a401280a@phx.gbl... > From one worksheet to the next, the ent...

Workflow Manager cannot start
I'm trying to allow a new employee access to edit workflows. I've copied: Microsoft.Crm.dll Microsoft.Crm.Tools.WorkflowLibrary.dll Microsoft.Crm.Platform.Proxy.dll Microsoft.Crm.Tools.WorkflowManager.exe Microsoft.Crm.Tools.WorkflowMonitor.exe With these files, everything runs fine from my workstation. However, on his machine he gets this error: --------------------------- Microsoft CRM Workflow Manager --------------------------- Workflow Manager cannot start. This could be because the workflow configuration file is corrupted, or the Microsoft CRM Workflow Service cannot access...

ISE will not start on XP SP3
I'm trying to learn PS and have installed v2 CTP3 on my Windows XP SP3 system. It seemed to go on fine. When I try to launch PowerShell ISE it just starts and dies within a couple seconds. It does not even become visible. I have to catch it in Process Explorer just to see that it even launched. The Windows PowerShell V2 (CTP) prompt starts just fine. There are no entries in any event log indicating that I even attempted to start it. I am logged on as an administrator. Any ideas? Thanks, Tom On 1/11/2010 1:57 PM, Tom K wrote: > I'm trying to learn ...

Pull report from start and end date
Hello, On my form I have a Start Date field and a End Date field to represent the start and end of monthly premium coverage. The problem I am having is, how do I pull a report using the start date and end date when they are two different fields? I am use to the beginning and end date being from one field not two so I am totally lost. If this can be accomplished, any help would be most appreciated. Thanks!!! Stockwell43 wrote: >On my form I have a Start Date field and a End Date field to represent the >start and end of monthly premium coverage. The problem I am having is, how do ...

Network Password entered each time Outlook starts
I have Office XP Pro with Outlook 2002 and EVERY time I start up Outlook it asks me to enter my Network Password. I do and check the box to remember my password but is shows up again next time. Anyone know how to get it to accept the password? I had Office 97 and Outlook 97 before and never had this problem. I have already installed Office XP Service Packs 1 & 2. brunyon@knoxy.net If you are still having problems after applying both the SP 1 & 2 patches, then see if this article addresses your problem OL2002: The Save Password Setting Is Not Saved When You Connect to a POP...

Can't open this item. The end date you entered occurs before the start date.
Hi, Everytime I open Outlook 2000 I get a calender pop-up. When I Dismiss it I get a message such as the above and the next time I open Outlook it appears again. I can't see it in the Calender unless I change the view to "By category". I can't delete it or change the date in this view. I just keep getting the above message (see subject line). I tried /cleanreminders and the MS article about Daylight savings but neither work. How do I get rid of this message? I do have a Pocket PC and probably the error occured during a Sync (i have different time zones). ...

Start-up worksheet!?
Hello basically I would, each time i open my spreadsheet model for the worksheet i wont to pop up, and from there i can navigate easily to the other worksheets by buttons, how can i make a worksheet to pop up like this everytime i open the file....? Thanks From John -- Neo1 ------------------------------------------------------------------------ Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30329 View this thread: http://www.excelforum.com/showthread.php?threadid=515098 Private Sub Workbook_Open() Worksheets("Sheet1").Activate End Sub ...

4.0 Workflow
I am trying to setup a workflow to send an email when an Account record gets deleted. I want to include the name of the Company in the email and who deleted it. The workflow fires, but always has a Status of Waiting because it says "The requested record was not found or you do not have sufficient permissions to view it". The reason this happens, I am assuming, is that the record has already been deleted so data from the record cannot be included in the email. Is there a way I can accomplish what I want? Workflow plugins are asynchronous so by the time you get to the databas...

How Can I tell which product key is on which Mac?
I hve 30 Mac's at my location and 30 coppies of Office. One hard disk has failed and needs to be rebuilt. My predicessor did not record which Product key goes with which machine. How can I match the product keys to the computers so I know which license belongs on the rebuilt machine? ...

Starting Outlook from Cmd Line
When Outlook 2003 starts, by my preference, it prompts me for whether I want to Connect to Exchange or Work Offline. Is there a way to start Outlook so that the response to this is embedded in the command line. Can't seem to find a switch that applies. -- ------------------- Dave Brandman Atlanta, GA No, there's no switch for that. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Dave Brandman" <davebrandman@no.spam.me.comcast....

Request for Microsoft reply: Default start page feature missing??
When you go Tools > Options > General Tab, there is no section to change the defual start page. When using the help function within the box "Set Personal Options Form" the very first help topic is "Set start page and view options" this clearly talks about a Default Pane. I was first alerted to the supposed availability of this feature in the book "Working with Microsoft Dynamics CRM 3.0 by Mike Snyder Page 193. Does anyone else get this section in the General tab? Is it a bug in my installation? Did Microsoft leave it out? ---------------- This po...