Button click did not run in the subform

I have a main form with Tabbed forms.  Within a specific tabbed form
called "Form2" I have a subform called frmOWNER which has a SAVE
button.  But within frmOWNER I have 8 subforms, frmLEVEL1 through 8.
On one of the 8 subforms, when a user inserts a record, the SAVE
button is clicked.  However, you must double-click in order for it to
work.

MainForm.Form2.frmOWNER.frmLEVEL1

How to resolve the double-click issue?  Why didn't it work with just a
click?
0
Linda
12/13/2007 7:57:46 PM
access.forms 6864 articles. 2 followers. Follow

7 Replies
1315 Views

Similar Articles

[PageSpeed] 2

In which event is your code to save the record?

-- 
Dave Hargis, Microsoft Access MVP


"Linda" wrote:

> I have a main form with Tabbed forms.  Within a specific tabbed form
> called "Form2" I have a subform called frmOWNER which has a SAVE
> button.  But within frmOWNER I have 8 subforms, frmLEVEL1 through 8.
> On one of the 8 subforms, when a user inserts a record, the SAVE
> button is clicked.  However, you must double-click in order for it to
> work.
> 
> MainForm.Form2.frmOWNER.frmLEVEL1
> 
> How to resolve the double-click issue?  Why didn't it work with just a
> click?
> 
0
Utf
12/13/2007 9:32:01 PM
The Click event.  Which apparently works fine the very 1st click if
the cursor wasn't in the Subform's subform called frmLEVEL1.
0
Linda
12/13/2007 9:51:21 PM
Okay, that explains it.  The first click is to move from the subform to the 
main form and the second fires the click event.  I don't know of any way to 
get around this.
You can test my theory by clicking anywere in the main form except on that 
button, then click on the button.  I think it will fire then.  But, that 
doesn't resolve the problem.
-- 
Dave Hargis, Microsoft Access MVP


"Linda" wrote:

> The Click event.  Which apparently works fine the very 1st click if
> the cursor wasn't in the Subform's subform called frmLEVEL1.
> 
0
Utf
12/13/2007 10:00:03 PM
Yes that's definitely the case.  But I need a fix.
0
Linda
12/14/2007 5:12:06 PM
I don't know of any fix to do that.  When you are in the subform, you have to 
take some action to return to the main form.  That means code to set the 
focus to a control on the main form or clicking somewhere on the main form.  
As to putting code to move the focus, I can't offer a suggestion without 
knowing how your subform operates.
-- 
Dave Hargis, Microsoft Access MVP


"Linda" wrote:

> Yes that's definitely the case.  But I need a fix.
> 
0
Utf
12/14/2007 5:20:05 PM
Oh, I just noticed something.  Only when the subform frmLEVEL1 is
being entered the very 1st time does the 2 clicks apply.  Once records
are already saved.  If you go in to enter another record, you only
need 1 click.
0
Linda
12/14/2007 8:24:13 PM
Interesting, but I would have to set up a test environment to figure out why.
-- 
Dave Hargis, Microsoft Access MVP


"Linda" wrote:

> Oh, I just noticed something.  Only when the subform frmLEVEL1 is
> being entered the very 1st time does the 2 clicks apply.  Once records
> are already saved.  If you go in to enter another record, you only
> need 1 click.
> 
0
Utf
12/14/2007 9:14:05 PM
Reply:

Similar Artilces:

Running a macro depending on a cell value
Hi there, I have an interesting one here ... I have assigned a macro to a command button. However I want to control this macro not to happen, i.e. not to run on click of the command button, depending on the value of another cell. That is say cell a1 = 1 I want the macro to work on click of command_button1 if cell a1 = 1. But i do not want it to run, i.e. act as if there is no macro assigned to it, if cell a1 = 2 or any other number not 1. Can this be done. Would appreciate any suggestions Thanks in advance, Brian Sure you can do that with an If statement. Example: Sub Button2_...

CFile::GetStatus throws an exception when run from CD
I have a small app that is checking to see if the file dotnetfx.exe is present in the same directory as my executable. I am running VS.NET 2003 and using unmanaged C++. Everything works great, as long as my executable is not on a CD. When burned to CD, the call to GetStatus will throw "the parameter is incorrect". The strings are correct (and obviously it runs fine when not burnt to CD). CString strHelpFilePath = AfxGetApp()->m_pszHelpFilePath; int iFileLoc = strHelpFilePath.ReverseFind(_T('\\')); CString strFxLoc = strHelpFilePath.Left(iFileLoc + 1) + ...

New contacts not showing when selecting the "To" button on a new e
Hello, If I add a new contact in Outlook 2003. Then I go to compose a new email. When I select the "To" buttom and either search or look for the new contact I created. It doesn't not show up. Any help would be appreciated. Thanks, Tony Two possibilities: 1. Your Contact doesn't have a resolved, valid electronic address 2. You did not add the Contact to the same folder you are displaying in the address book view. -- Russ Valentine "Tony414" <Tony414@discussions.microsoft.com> wrote in message news:AE3B3E10-8FCD-4840-8924-5B33D99A1F25@mi...

Error Running Inventory Site Combiner 7.5
Hello I am trying to run the Inventory Site Combiner in Great Plains Version 7.5 SP5. I am receiving the following error [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PKPOP40800'. Cannot insert duplicate key in object 'POP40800'. I checked the ODBC connection setup and is correct. Any ideas? Thanks, Brian ...

How do I turn on Smart Tag Buttons?
I can see the red dots under the text that should have a Smart Tag connected to it, but I can see the Button to activate the Smart Tag. Wglade wrote: > I can see the red dots under the text that should have a Smart Tag > connected to it, but I can see the Button to activate the Smart Tag. Word 2003: Click Tools > AutoCorrect Options > Smart Tags, and check the box at the bottom of the dialog. Word 2007: Go to Office button > Word Options > Proofing > AutoCorrect Options > Smart Tags, and check the box at the bottom of the dialog. -- Regards, Jay F...

totals do not display unless user clicks on text box
I am relatively new to access. I am using access 2007 to create a report that contains subtotals. When the report is displayed on the screen the subtotals are blank. When the user clicks on the subtotal text box then the value appears. The user has to click on each subtotal in order to make the value appear. Has anyone experience this problem? Is there a workaround or solution? Thanks Normally a sub-total in a report is achieved by means of an unbound text box in a group footer with a ControlSource property which is an expression summing a set of values from the detail sect...

Get $500 to your PAYPAL Account by just one CLICK #2
i have hidden the form of getting $500 to your PAYPAL ACCOUNT....CLICK on the IMAGE which is on the RIGHT SIDE of the website http://tricks-4u.4-all.org/ ...

Button invisible if User_Type is User
I need a couple of tweeks to my splash form... 1. I would like to display the FullName of the user logged in on the Splashform. The Fullname and the login ID is listed in the table (tblVersion). 2. There is a button that should not be visible if the user logged in has the User_type of "User" and should be visible if the User_Type is Admin. The button is called "btnAdmin" . How can I accomplish this? I need this desperately!! I have a table (tblVersion) with the following fields: UserID, FullName, and User_Type mousm, Mickey Mouse, Admin bman, Clark Kent, User...

rent received/balance owed/running balance spreadsheet
I am looking for a spreadsheet?? that shows me the rent owed then paid by the renter and balance if any per month, but do not know how to build one! A very simple balance sheet assuming a monthly rent: A1:D1 column headings: A1: Date B1: Rent C1: Payments D1: Under/Over Paid Then in cell A3 enter the formula: =IF(A2="","",IF(DATE(YEAR(A2),MONTH(A2)+1,DAY(A2))<TODAY(),DATE(YEAR(A2),MONTH(A2)+1,DAY(A2)),"")) and copy down as far as you need. All cells should remain with a blank display until a date (more then a month old) is entered in A2 then automaticall...

button
Hello I have a button on a form that runs a macro to open up another form to display details against a selection that was made in the 1st form. For example Main form1 had a drop down, next to it is a button. when the button is clicked it runs a macro to open form 2 with details related to the drop downs selection. This all works fine when it has a selection in it, the problem I have is if the button is pressed before the selection is made it brings up form2 as a grey square and you can do nothing to it, is there anyway i can make it so that the button either wont work until a selection is mad...

crawl animation followed by a click
I have four piecs of a jigsaw puzle. I wish to animate each pieces by triggering the following actions 1) very slow crawl from right 2) when th pece moves into position (i.e. touches the previous piece) i wsh to have a click sound. PS If i add the click sound effect it plays at the beginning when the piece has just begun moving PS If i trigger it to play after previous action of crawling entrance it does not happen The click sound is an extremely short time wav file (i have tied other formats as well) and there is no codec problem whatsoever (all other sounds and songs play ...

How to change the right-click pop-up menu in CHtmlView?
Hi, I use MFC in VC6.0. When users click the right button of the mouse in CHTMLView, the default menu pup-up. Is there a way to change the pop-up to my own defined menu? Sorry for cross posting, for I don't know the right group. Thank you, Kelvin "Kelvin" <Kelvin_gl@yahoo.com.cn> wrote in message news:uacCpSGcEHA.3988@tk2msftngp13.phx.gbl > I use MFC in VC6.0. When users click the right button of the mouse in > CHTMLView, the > default menu pup-up. Is there a way to change the pop-up to my own > defined menu? See KB Article KB236312 "HOWTO: Disable t...

round buttons in Excel?
Hey all -- I am setting up a complicated Excel workbook with an opening menu page featuring buttons leading to specific areas of interest. That part I have down cold -- my question is, do buttons have to be rectangular? To fit with departmental preferences I'd like to create a series of oval buttons. Any suggestions? > That part I have down cold Great -- in that case, just use stuff from the Drawing toolbar instead of a button (eg: an oval and a text box grouped). HTH, Andy ...

Excel 2003 - VBA
I need someone to give me a few buzz words and point me to some reference work so that I can get started. I want to place several buttons on a worksheet that will help the user move around. I need to create a button then upon activation change the Caption and execute a macro that will create a button on another sheet. upon activation of this button, I will execute a macro and at the end of the macro, delete the button. In order to work with the button I need to name it then address it to make the changes and ultimately delete it. Here is the code I used to create the first button: Active...

Event handling with dynamic buttons
I am not sure how to do this. I have part of it working and I think I understand why it isn't working. I am dynamically placing some data into and ASP:Table from a DataSource. I am looping through the datasource by going through the rows no problem to display the data in cells added by rows to the asp:table. What I am also doing though is adding a button for each row that is to run an Access insert query that adds a record in a log table. I have used the following code to get this to work which it does: ... this is in a loop of the DataSet for (int i = 0; i < dsResu...

how 2 create and run a macro
i want to try record a new macro. can you teach me the way to create and run it. i am facing the problem Hi a good introduction to macros can be found at: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany Lee Sok Har wrote: > i want to try record a new macro. can you teach me the way to create > and run it. > i am facing the problem ...

Will my Office OS X updated to 10.1.9 run on my new Intel nased Mac
Version: v.X Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I have Office for Mac OS X, uppdated to 10.1.9., on my old 10.3.9 G4. I am taking delivery of an Intel based Macbook Pro running 10.5 Will my old Office run on Leopard? If not, is the Home/Student Version equivalent, or do I have to buy the much more expensive Office 2008? Can you get rebates? You've actually raised several issues here, so see the in-line responses: On 6/28/09 12:27 PM, in article 59b773f8.-1@webcrossing.caR9absDaxw, "Sparkswj72@aol.com@officeformac.com" <Sparkswj72@aol.com@officeform...

Erroring Openeing Subform
Hi, I have a mainform / subform which when the user double clicks on the subform, it opens a pop up form which displays the record slected in the subform so the user can edit data. I use the following to open the pop up form: DoCmd.OpenForm "frm_BkpExec_Ntepad", , , "id = " & me!id This works fine, except if there are no records in the subform, and the user still double clicks in that window, then an error gets returned. How can I have this so that when the user double clicks in this window and there are no records in the subform, the double click is just ignor...

sum calculation in subform based off of a query
I have a Main form that has date at the link to the subform. each record is a given DAY then the cleaning jobs are scheduled in the subform. Each cleaning job has an est. time. In the subform many people are scheduled to do many jobs. and same person is usually scheduled to do many jobs. Worked hard and this is the way the form subform - we want layed out. I would like to get a running total as each job is scheduled in the subform - sum of est. time by person(clockid). Have the subform sorted by person so they are all grouped together- tried putting sum of est time in footer. Many ...

Right click to create new file with Excel 97
We use Excel 97 at our office on Windows XP Professional. A couple of users want to be able to create new files by using new from the right click menu and selecting Microsoft Excel Worksheet. The creation of the file works fine in that the filename is filename.xls. When they open the file and add information and then try to save the file, Excel wants to save as tab delimited. Creating a file by opening Excel first works just fine. We have tried this on several computers and the results are the same. For convenience is there some way to change this behavior? ...

Is RAID1 good enough for a local office database/file server (running Windows 2008 Server)? Or RAID5? Options
Hi Our IT suppliers are telling us that hard disks are now so reliable, that RAID1 good enough for a local office database/file server (running Windows 2008 Server)? Or should we go for RAID5 ? All feedback gratefully appreciated. With thanks Ship Shiperton Henethe Hi Shiperton, RAID 1 is at least equally reilable as RAID 5. Both configurations tolerate losing one disk. However, if you calculate statistically, chances are bigger that one drive will fail out of three (RAID 5) than one out of two (RAID 1). The same is statistically true that two drives will fai...

KBBAR and BS_OWNERDRAW BUTTON
&#1061;&#1086;&#1095;&#1091; &#1076;&#1086;&#1073;&#1072;&#1074;&#1080;&#1100; &#1074; toolbar button &#1089;&#1086; &#1089;&#1074;&#1086;&#1081;&#1089;&#1090;&#1074;&#1086;&#1084; BS_OWNERDRAW. &#1045;&#1089;&#1083;&#1080; &#1082;&#1085;&#1086;&#1087;&#1082;&#1091; &#1076;&#1077;&#1083;&#1072;&#1090;&#1100; &#1095;&#1083;&#1077;&#1085;&#1086;&#1084; &#1082;&#1083;&#1072;&#1089;&#1089;&#1072; ...

Toggle Button
Hi all ...in a form..i have a unbounded text field and a unbounded toggle button..on clicking the toggle button I want to change the value in the unbounded text field to Yes or No...how do I do this? Thanks! In the click event of your toggle button put this code If YourTextBoxName = "Yes" Then YourTextBoxName = "No" Else YourTextBoxName = "Yes" End If "Peter" wrote: > Hi all > > ..in a form..i have a unbounded text field and a unbounded toggle button..on > clicking the toggle button I want to change the...

Hide Sales Button
Hi Does anyone knows wich security setting shoul I remove to hide the Sales big button (bottom of the crm page). I saw that, for example, the CSR Manager don't show this button, and Customer Service Representative show it. I tried to compare the security roles but I couldn't find the diference. In fact, I removed all the Sales tab permissions (on the Customer Service Representative role) but the button still apperars. Thanks -- Carlos That button is visible due to the licence the user has. If the user has a sales or suite licence, then he/she will see the Sales big butto...

Regarding button grayed out in CRM for Outlook
Hello, I have the above problem in 2 pcs. First has OS windows XP professional and Outlook 2003 SP2. Second has OS windows 2000 professional and Outlook 2003 SP2. In both the CRM toolbar appears fine, and, when you click on it the forms that open have the Regarding buttons grayed out, so we cannot really use them. No error message, no other problems. Please advise, Elena So does it work for other computers or other users on those computers? Could be a security role issue for the users. Does it work if they access CRM through Explorer rather than Outlook client? Ryan Elena wrote: &...