OnEvent Click and Tab Controls

Good Day All..

I have an issue that I had posted previously but it did not get resolved.  
It may partially be my fault for not explaining my need/question correctly.

I have a form.  The form contains a subform. & a tab control.
The subform has 3 fields listed for the user: ShipTo, BillTo & Account Name
The tab control has 3 tabs.  The first tab is where I am struggling right 
now.  

I want the user to select ('click') on the "account" in the subform (data 
sheet) at the top.  Once they click the "account" the fields on the tab 
control will then fill with the data for that specific "account".  (Contact, 
Address 1, Address 2, City, State, Zip, etc.)

I am not sure what I am missing from a VBA code to make it happen.  In the 
past I have had forms that passed an "ID" but those opened a form instead of 
sending the data to the fields of the tab control.

Does this make sense?

Thanks,
Jim
-- 
"Baliff.  Whack him in the pee-pee!"
"How come his is so much bigger then yours?"
"I am not even suppose to be here today!"
0
Utf
10/2/2007 9:12:32 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
656 Views

Similar Articles

[PageSpeed] 44

That Crazy Hockey Dood wrote:
>I have an issue that I had posted previously but it did not get resolved.  
>It may partially be my fault for not explaining my need/question correctly.
>
>I have a form.  The form contains a subform. & a tab control.
>The subform has 3 fields listed for the user: ShipTo, BillTo & Account Name
>The tab control has 3 tabs.  The first tab is where I am struggling right 
>now.  
>
>I want the user to select ('click') on the "account" in the subform (data 
>sheet) at the top.  Once they click the "account" the fields on the tab 
>control will then fill with the data for that specific "account".  (Contact, 
>Address 1, Address 2, City, State, Zip, etc.)
>
>I am not sure what I am missing from a VBA code to make it happen.  In the 
>past I have had forms that passed an "ID" but those opened a form instead of 
>sending the data to the fields of the tab control.


I suggest that you use the DoubleClick event instead of
Click, because users might click inadvertantly.

The code would be something along these lines:

	Parent.txtContact = Me.Contact
	Parent.txtAddress1 = Me.[Address 1]
		 . . .

-- 
Marsh
MVP [MS Access]
0
Marshall
10/3/2007 3:58:05 AM
Marsh..

Thanks for the response.  I may be missing the picture here.  I assume the 
call of "Parent" refers to a parent link in the form.  If so then that could 
be an issue since I do not have a parent/child link.

I felt the click event was okay to use since it will not do any harm if the 
user clicks on the datasheet subform in error.  It will only provide the data 
to the defined fields which would easily be updated when clicking on another 
item.

If you could clarify a bit then it may put me back on the right track.  I am 
semi-novice in the world of Access VBA.  I am waiting on a book I ordered to 
help with that part of it.  =)

Thanks,
Jim
-- 
"Baliff.  Whack him in the pee-pee!"
"How come his is so much bigger then yours?"
"I am not even suppose to be here today!"


"Marshall Barton" wrote:

> That Crazy Hockey Dood wrote:
> >I have an issue that I had posted previously but it did not get resolved.  
> >It may partially be my fault for not explaining my need/question correctly.
> >
> >I have a form.  The form contains a subform. & a tab control.
> >The subform has 3 fields listed for the user: ShipTo, BillTo & Account Name
> >The tab control has 3 tabs.  The first tab is where I am struggling right 
> >now.  
> >
> >I want the user to select ('click') on the "account" in the subform (data 
> >sheet) at the top.  Once they click the "account" the fields on the tab 
> >control will then fill with the data for that specific "account".  (Contact, 
> >Address 1, Address 2, City, State, Zip, etc.)
> >
> >I am not sure what I am missing from a VBA code to make it happen.  In the 
> >past I have had forms that passed an "ID" but those opened a form instead of 
> >sending the data to the fields of the tab control.
> 
> 
> I suggest that you use the DoubleClick event instead of
> Click, because users might click inadvertantly.
> 
> The code would be something along these lines:
> 
> 	Parent.txtContact = Me.Contact
> 	Parent.txtAddress1 = Me.[Address 1]
> 		 . . .
> 
> -- 
> Marsh
> MVP [MS Access]
> 
0
Utf
10/3/2007 6:19:01 PM
That Crazy Hockey Dood wrote:
>Thanks for the response.  I may be missing the picture here.  I assume the 
>call of "Parent" refers to a parent link in the form.  If so then that could 
>be an issue since I do not have a parent/child link.
>
>I felt the click event was okay to use since it will not do any harm if the 
>user clicks on the datasheet subform in error.  It will only provide the data 
>to the defined fields which would easily be updated when clicking on another 
>item.


If you are not familiar with a term, look it up in VBA Help.

Parent refers to the form object that contains the subform
kind of like Me refers to the form that contains the line of
code 	that uses Me.  Maybe you want to think of Parent
refering to the parent form of Me

Use whatever event you like.  I was just pointing out a
potential drawback to using a common event to update data,
especially if it might change an existing record.

-- 
Marsh
MVP [MS Access]
0
Marshall
10/3/2007 8:34:59 PM
Reply:

Similar Artilces:

Member Server to Domain Controller
Hi How do I promote a member server running Windows 2003 Server SP2 and Certificate Services to a domain controller. Regards Use the system command dcpromo Check out the link below http://www.petri.co.il/how_to_install_active_directory_on_windows_2003.htm -- Paul Bergson MVP - Directory Services MCITP - Enterprise Administrator MCTS, MCT, MCSE, MCSA, MCP, Security +, BS CSci 2008, Vista, 2003, 2000 (Early Achiever), NT4 Microsoft's Thrive IT Pro of the Month - June 2009 http://www.pbbergs.com Please no e-mails, any questions should be posted in the NewGroups. ...

tabs #2
When I use my tab button, instead of moving to the next cell to the right it jumps from column A to M then Y then AK etc. How can i turn this off and get the tab button to move only one square. I have read on these forums where people want to jump many columns but my complaint is just the opposite. Ian, Tools - Options - Transition. Uncheck Transition navigation keys. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Ian Sly" <Ian Sly@discussions.microsoft.com> wrote in message news:7246A62A-2B2A-4135-B723-8ECFCAD948...

SetWindowPos ZOrder does not work with overlapping controls?
Hello NG, I have a problem with the ZOrder of SetWindowPos. In my CDialog, I use a bitmap CStatic to display a background picture. On that, I want to show some controls. I do it as follows: m_stcBackgroundPic.SetWindowPos(&wndBottom, 0,0,1024,496, SWP_HIDEWINDOW); m_btnDoSomething.SetWindowPos(&wndTop, 10,10,100,60, SWP_HIDEWINDOW); m_stcEditCaption.SetWindowPos(&wndTop, 10,175,150,30, SWP_HIDEWINDOW); m_ctlEdit.SetWindowPos(&wndTop, 170,175,170,30, SWP_HIDEWINDOW); Later, I show the controls with ShowWindow in the same order as above (first the background pic, then the butt...

Tabs in my workbook are hidden
When i maximise a spreadsheet my tabs at the bottom are hidden by the start/drawing menus - does anyone know how to fix this? Assuming that in Tools, Options, View you are set to view sheet tabs, you could try dragging the Drawing toolbar (and other toolbars) by the left edge to the top or right of the screen. Gee Wrote: > When i maximise a spreadsheet my tabs at the bottom are hidden by the > start/drawing menus - does anyone know how to fix this? -- Bryan Hessey ------------------------------------------------------------------------ Bryan Hessey's Profile: http://www.exc...

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/ ...

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...

Tab key moves
Can I pre-select which cell the tab key moves me to? I have a specific order I would like to follow each time. Is there a way I can fill out one area of my form before having to tab through another area? Not in a reasonable userfriendly way, no. The default behavior is left-to-right next unlocked cell, top to bottom. (But that is IMO how your application should be designed anyway.) HTH. Best wishes Harald "DCZ" <DCZ@discussions.microsoft.com> skrev i melding news:43C38961-D5BF-4F45-9CF5-DF2CD5958E9D@microsoft.com... > Can I pre-select which cell the tab key moves me to?...

Missing Sheet tab #2
The tab where I select Sheet1, Sheet2, Sheet3 etc is missing how can I get it back??? I am using Excel 2007 Thanks Kamal Try Changing your display resoulution up a step? And then open the file. Kamal wrote: > The tab where I select Sheet1, Sheet2, Sheet3 etc is missing how can I get > it back??? > > I am using Excel 2007 > > Thanks > Kamal > > ...

locking tabs w/macros
i have a workbook that employees use to track project progress. they enter project data into sheet 1 and vbscript macros manipulate this data and output it in various ways on worksheets 2-15. i want to lock sheets 2-15 so employees cannot enter data, but when i protect those sheets the macros are no longer permitted to work. is there a way i can prevent cell editing by USERS but permit editing by MACROS? this seems like it should be fairly obvious, but i cant figure it out. thanks in advance! Hi eric, 1) you might want to use the following instruction when protecting the sheets: ...

Is there a way to go through all the controls on a MFC dialog?
hi, I need to get through all the controls in a MFC dialog without knowing their ID at design time. That mean that the program must get the id and then get the control. Is there a better solution? One thing is for sure, I have to get the CWnd* of all of the controls on a dialog. How do I do this? thanks ThunderMusic > I need to get through all the controls in a MFC dialog without knowing > their ID at design time. CWnd* pChild = MyDialog.GetWindow(GW_CHILD); while (pChild) { // your code... pChild = pChild->GetWindow(GW_HWNDNEXT); } thanks, it works... I had the GetWin...

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...

Release VS2005 & XP Common Controls Manifest
Hi, I have a couple questions. 1) When upgrading an MFC project from VS2003 to VS2005, the manifest options in the upgraded project settings cause Windows not to recognise the embedded manifest (as a resource) and no hence no XP controls. 2) I thought that to fix this I would create a VS2005 MFC application and look at how it sets up the manifest. Setting up a single dialog based MFC App, (with "Common Control Manifest" ticked under Advanced) I assume should create an MFC app that includes the necessary manifest and project settings - however the resulting app does not inc...

Automating a Summary Tab
I have a workbook that I need a summary page that will breakout 2 different tabs and subtotal it Is there a way that if 1 tab holds Part #, Desc, and Price Another tab holds Total Price for the type of project it is So that would be: Model, List Price In a Summary tab I would like to show Item # (this would automatically start numbering each row) depending on how many choices they made in the other tabs Part # Description Model Length of term # users List Price They could choose anywhere from 2 parts to 15 parts how do I get it to automatically populate for what they chosen in this new...

sheet tabs as page number and in a cell page of pages?
i have looked a little but can't find what i think is the right thing. i have a workbook with 3-4 pages in it. in the upper righthand corner is a page of pages cells set up. i want to have it grab the current tab(page) for one cell and the rest of the tabs(pages) for the other cell. i am not very good at the coding VB thing so exact instructions would be grately appreciated. i have tried a few of the suggestions but cannot get them to work. i am using excel 2002. TIA ...

ActiveX control is not shown correctly in Access Reports print pre
Hi All, we are developing ActiveX control's to use in MS Access. The control works fine with Access form in design mode and running mode. But in case of reports the design mode shows the control correctly but when comes to print preview mode, the size and drawing on the control is not working properly. The same control works fine with Access 2002. The problem is found to be with Access 2000. We need to enable XP theme from UxTheme.dll(Microsoft provide) if theme is avaible in the system. The drawing of theme is alo goes wrong in Access 2000 reports print preview mode. please help ...

How to Drag/Move the IE control based Application
Hi All: I am developing Dialog based application. I have placed Microsoft WebBrowser control(IE control) on main Dialog of application. On the IE control, all messages are being passed to IE control. Now problem is that I am unable to drag/move this IE Control/Dialog. Any idea about moving IE control/Dialog Please help me in this regard. Regards, Ghazanfar Ali ...

I need a "Tutor available for Math" template with telephone tabs
Like a job flyer. With phone numbers running perpendicular in cut away tabs On Wed, 1 Feb 2006 05:17:27 +0000, Tutor available wrote (in article <B83788BB-0469-4028-9E5B-361C130502E6@microsoft.com>): > Like a job flyer. With phone numbers running perpendicular in cut away tabs But too lazy to create his own flyer. Anyway, it's *MATHS*. The subject is mathematics, plural, therefore the shortened plural form is, logically, maths. You Yanks were never much good at logic, though. What version Publisher? In 2002/03, file, new, Publications for Print, flyers, scroll way down to...

ActiveX Control error message
When I try to open any of the RMS modules (Store Operations Mgr, for example) iwhich are nstalled on my server I get the following message: "ActiveX component can't create object" I AM able to open them on both of the other computers networked to that server. I am not very tech-savvy so I'm reluctant to try anything too technical to fix this, but do any of you have something simple that would work? Or at least something that would help diagnose the problem? Thanks. -- WineGuy Hi there, It depends on what version of RMS You have installed... Anyway, there is a so...

Access2007 ON_CLICK problem on IMAGE on a TAB CONTROL
Hi All, With Access 2003 i made a form with a tab control. One one of the pages there is an image control with an ON_CLICK event assigned to it (normal vba procedure). With Access2003 the ON_CLICK is executed correctly Exactly the same DB run under Access 2007 the ON_CLICK event is ignored...no reaction at all....... This problem does not seem to occur if the image is not on a tab control Nor does it appear when i replace the image with a Button control. Can anyone tell what is hapening ? Rob, this is a known issue, but it was fixed in the service pack Microsoft released this week. You c...

Make Bit field control value of float field
Hi. I've made bit field with the default options of yes and no: new_Q1 Then i've made a field to collect a amount of points, incase the bit is set to yes: new_Q1p. If i select the format of the bit value to "list" my script works fine. If I select "check box", it does not work. Can any one help me modyfi the script to work with the check box? Thanks Regards, Jacob Mondrup This is the script I use: ______________________________________________________________________________ var point = 0; var get_status = parseInt(crmForm.all.new_q1.DataValue); switch (get...

Delegates tab and outlook not responding
I have a uesr in my building that needs to have people delegated in Outlook 2002 to view her calender. Whenever she clicks on the delegates tab, outlook freezes and says not responding. If you wait for about 10 mins, all of her people that she delegated finally comes up (which is about 20 people) and seems very slow. If she selects a person and clicks on the permissions tab the computer freezes again. Is there a limited number of users that can be delegated or no? Any information would be helpful. Thanks! Does anyone have an answer to this problem? If so, can you please email me at wk...

How to control contact sharing between Sharepoint and Outlook
Hey all, assume we have a contact list in sharepoint (SP) with 50,000 items (customers). We also have a sales force of 100 people in several groups. Now the problem: If I share the SP contact list with the sales people via Outlook, everyone of them will receive the 50,000 names. How can I control the sharing of contacts between SP and Outlook so that every sales person only receives the customers for example related to the particular sales group or limited by other parameters. Thanks in advance, Harry Hi, STC-Harry, Though this is a "misc" issue because it spans m...

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? ...

CImage, CStatic (Picture Control), CObArray problem
Please help! I need to create a dialog where the user can add, remove and navigate among images - one image shown at a time. So, I created the dialog, added the buttons for adding and so on, and a CStatic picture control to display one image. The dialog has got tabs, where the image handling is on one of the tabs. The pictures are stored in a CObArray as CImages. However, absolutely nothing works with these images... I've tried just about every tip I've found in this group, at MSDN, GodeGuru and everywhere. It might be because I'm not that experienced and clever VC-programmer. So ...