Moved Form Data to Tab Control

Hi All,

I recently moved all of my form fields to a tabbed control.  The reason i 
did this was to utilize a subform.  My main problem now is that none of my 
code is working on the form now.  Can some explain why none of the old code 
works now and how i can go about getting it to work.  Thanks
0
Utf
11/17/2009 8:09:01 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
573 Views

Similar Articles

[PageSpeed] 14

You've likely made your form into a subform.  Let's say your tab control is 
housed on frmTab, your old form was frmMyForm.  Your old code likely 
referenced a control on your old form as Forms!frmMyform!MyControl.   To 
reference that control now you have to use Forms!frmTab!frmMyform!MyControl.

Regards

Kevin


"scott04" <scott04@discussions.microsoft.com> wrote in message 
news:5720C246-E8D0-47BE-B822-EAAEF04D9241@microsoft.com...
> Hi All,
>
> I recently moved all of my form fields to a tabbed control.  The reason i
> did this was to utilize a subform.  My main problem now is that none of my
> code is working on the form now.  Can some explain why none of the old 
> code
> works now and how i can go about getting it to work.  Thanks 


0
kc
11/17/2009 11:17:45 PM
If the controls in question were simply moved from the form's Detail Section
directly to a page of the tabbed control, you need to "reconnect" the
controls and their event codes.

Courtesy of ADezii at Bytes.com, this code will "reconnect" controls to some
selected Events (OnClick and AfterUpdate in this example.) It can be modified
for other Events, and has the advantage of updating a large number of
controls without doing them one by one.

Private Sub Form_Load()
Dim ctl As Control

For Each ctl In Me.Controls
If (TypeOf ctl Is TextBox) Or (TypeOf ctl Is ComboBox) Then
If ctl.OnClick = "" Then
ctl.OnClick = "[Event Procedure]"
End If
End If
Next

For Each ctl In Me.Controls
 If (TypeOf ctl Is TextBox) Or (TypeOf ctl Is ComboBox) Then
   If ctl.AfterUpdate = "" Then
     ctl.AfterUpdate = "[Event Procedure]"
   End If
 End If
Next
End Sub

Alternatively, in Design View,  you can select a control, go into Properties -
Events and click on the event in question, to take you to the code window, as
if you were setting it up for the first time. Once in the code window, simply
return to Design View. The control is now "connected" to its code and the
hotkey will work. The disadvantage to this is that it's time consuming if it
involves a lot of controls.

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200911/1

0
Linq
11/18/2009 12:39:49 AM
Thank you for that information...i simply strarted from scratch with the 
form...created the tabs and then migrated my code...now everything seems to 
work...thank you

"kc-mass" wrote:

> You've likely made your form into a subform.  Let's say your tab control is 
> housed on frmTab, your old form was frmMyForm.  Your old code likely 
> referenced a control on your old form as Forms!frmMyform!MyControl.   To 
> reference that control now you have to use Forms!frmTab!frmMyform!MyControl.
> 
> Regards
> 
> Kevin
> 
> 
> "scott04" <scott04@discussions.microsoft.com> wrote in message 
> news:5720C246-E8D0-47BE-B822-EAAEF04D9241@microsoft.com...
> > Hi All,
> >
> > I recently moved all of my form fields to a tabbed control.  The reason i
> > did this was to utilize a subform.  My main problem now is that none of my
> > code is working on the form now.  Can some explain why none of the old 
> > code
> > works now and how i can go about getting it to work.  Thanks 
> 
> 
> .
> 
0
Utf
11/18/2009 5:18:03 PM
Reply:

Similar Artilces:

Input form using 3 Tables
I have an Input Form based on a query using 3 Tables. 2 of the Tables are for information only. The 3rd table is the table I want to input and update information in. If I use 2 of the tables including the table I want to update the Input form works. Once I introduce the 3rd table my fields become locked. I have another database that is using the same concept and it works fine but this database isn't, what am I missing. Thanks ...

not able to move FLAG STATUS column in Outlook 2003
I tried to move FLAG STATUS column from the very right side to the left side when I am in my Inbox. IT WON'T LET ME!! Anyone was able to do that? No. --� 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 searching google.groups.com and finding no answer, Kenny Shu asked: | I tried to move FLAG STATUS column from the very right | side to the left side when I am in my Inbox. IT WON'T LET | ME!! | | Anyone was abl...

CRM appointment form instead of Outlook appointment form
In the outlook client, when I click the "Create New Appointment' button in the CRM toolbar, the Outlook appointment form appears. Is there any reason why it is not the CRM Appointment form that shows? Is there a way to use the CRM form instead? I know you can go in the "Activities in CRM" folder and create a new appointment from the Activities screen, but at this point, you no longer see the Outlook Calendar, so it is now very convenient, nor is creating a outlook appointment, clicking the track in CRM button and finally adding the missing field in the CRM appointme...

Bring filtered data from another file
I have a Birthdays file I have a Calendar file After each date in this calendar file I have 4 empty lines (assumption: max 4 birthdays on the same day) 15.01.2010 ......... ......... ......... ......... 16.01.2010 ......... ......... ......... ......... How can I bring the names for each date from the Birthdays file. Thanks and regards, CousinExcel ...

How do I print grid lines in a spreadsheet if no data is entered .
I am trying to create a form and need to print the grid lines as a part of the form. Others will use this form and make pencil entries in the cells which will be entered into the spreadsheet at a later date. How do I do this? I am using Office 2003. Many thanks---Justaone Just File>Page Setup>Sheet. Check "gridlines" and make sure "draft quality" is not checked. May be easier and more readable to have borders around just those cells that will be pencil-entered. If you go that route, uncheck "gridlines" in Page Setup. Gord Dibben Excel MVP On Sun, 2...

Moving license to a new computer
I bought a powerbook and am giving the kids my old imac. I'd like to move Office to the powerbook and remove it from the imac. Am I going to run into any technical difficulties doing this? In article <do3en0hjuiv1jrgsan1tlf23demblohh9p@4ax.com>, Andrew D <andrew.davilman@mindspring.com> wrote: > I bought a powerbook and am giving the kids my old imac. I'd like to > move Office to the powerbook and remove it from the imac. Am I going > to run into any technical difficulties doing this? Shouldn't. Run the Remove Office application on the iMac, and inst...

Safe to Move?
Hello, I remember seeing an article about moving $NtServicePackUninstall$ files to free up space. I think it was for Windows 2000 Server. Is it possible to do this for Windows 2003 server? -- Thank you for your help! JYC Hello Mr. JYC, Yes, you can do it and if are sure that there is no need to uninstall it you can delete it. 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/mul_crss.ht...

Copy or Move row on condition to different and/or multiple sheets
Good afternoon. I'm new to the world of programming in excel but have programmed elsewhere previously. What i am trying to do is to have a todo list setup, ive searched long and hard and can't find anything that quite fits my bill that i can replicate and alter to work so am asking for some assistance. I have a workbook with six sheets, All Jobs, Evaluation, Authority, In Progress, Completed and a helper sheet. In all jobs i have 9 columns A-I (atm A being spare) that have information that i need to show. In column 'I' i have a dropdown box using the helper sheet for p...

Live Mail,I can't move message "unknown Error" appears
-- There are several messages that I want to place in folders, but when I try to move them, I receive the message "Unable to move, Unknown Error". This is more than annoying, as these are important messages from various organizations I belong to. I like to archive these within the confines of Live Mail, and I don't want to hve to go in and out to various folders. Any help will be appreciated. Windows Live Mail Newsgroup. In your newsreader: news://msnews.microsoft.com/microsoft.public.windows.live.mail.desktop On the Web: http://www.microsoft.com/communiti...

Conv Access 97->2000-Gets a method or data member not found error
For the following code which compiles and runs successfully in MS Access 97, when converting to MS Access 2000 the following compile error occurs "Method or data member not found." for the line below. tempID = rs.[UserID] UserID is a field in the tblSecurity table. It seems that the tblSecurity table is not opening in MS Access 2000 since this error will occur using any field, not just UserID. This error does not occur in MS Access 97. PLEASE HELP. The routine is displayed below. Sincerely thanks, Phil ------------------ CODE - Shown Below ------------------ Private Sub...

Moving Exchange 2000
Hi, I have a exchange 2000 server running on windows 2000 which I need to move onto a new server/hardware but cannot find techincal documents telling me how to do this. The only documents I can find are on disaster recovery which doesnt seem to cover moving exchange across onto new hardware. Does anybody have some a document ??? Also I would like to run exchange 2000 on server 2003, I'm guessing that this won't be a problem to move it onto new hardware running server 2003 ?? Kind Regards Paul... Use the move-server method detailed here: http://tinyurl.com/ys7e9 -- Neil H...

Read Receipts won't move to 'delete bin' after processing
Very simply, my read receipts won't move to 'delete bin' after they are processed. This doesn't seem like a complex process. The tracking option allows me to either turn this rule on or off. What else am I supposed to do? I have receipts all over the place and I end up deleteting them manually. Hy, You have to delete it by yourself. It wont work with a rule. >-----Original Message----- >Very simply, my read receipts won't move to 'delete bin' after they are processed. This doesn't seem like a complex process. The tracking option allows me to either ...

mail moved from netscape to outlook?
Hello! I would like to know is it possible to move the mails from netscape mail to outlook? And what is the way? Thanks! >-----Original Message----- >Hello! I would like to know is it possible to move the >mails from netscape mail to outlook? And what is the way? >Thanks! >. > <anonymous@discussions.microsoft.com> wrote in message news:d08901c3efb2$759a75e0$a101280a@phx.gbl... > > >-----Original Message----- > >Hello! I would like to know is it possible to move the > >mails from netscape mail to outlook? And what is the way? > >Thanks! ...

Paste Access data into Excel spreadsheet
I was recently upgraded from Office97 to Office2002 (XP, I believe). In the past, if I copy and pasted Access data into an Excel spreadsheet, Excel was able to determine if the individual fields were text or number or date. With the upgrade, all fields are set as text when they are copied into Excel. This presents a problem with formulas I have set-up in Excel that are looking to calculate number fields. I have even tried to change the fields to number fields, but this doesn't work and is a bit tedious, too Does anyone know how I can get the process to work like it did with Off...

split db forms
I have a split db used over a network. I have read one shouldn't set the form's recordsource to a table. So what should be done? And then how do you set the sub-form's link properties since the main form isn't bound? I want to do things right, but would need to someone to give me a global prespective so I can try and understand a little better. QB If the data is in Access (JET) tables (i.e. not linked to some other kind of database), and you don't expect to have hundreds of thousands of records in your table, then you can just bind the form to your ta...

Control Tool Box
Hi, I want to learn how to use the elements (e.g. command button, option button, combo box etc.) in the control tool box. Can someone point me to some articles/tutorial? Don't seem to have much luck with help? What is the control tool box for anyway? Thanks. Epinn It is a collection of worksheet controls that are event driven. If you select one and then draw it on a worksheet, double-click the object and you will be taken to a template event procedure for that control. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Epinn" <...

Moving Pages between two publications
How can I move several entire pages from one document to another? Not simply the content of the page, but the format as well as positioning? Select all the elements on one of the pages and Group them together (a little icon will appear at the bottom of the bounding box - click it to lock the group) before you Copy and paste to the other publication. "FrankDe" <FrankDe@discussions.microsoft.com> wrote in message news:B2DF180E-4973-43D3-8278-7EDDF897EA60@microsoft.com... | How can I move several entire pages from one document to another? Not simply | the content of the ...

Move mailbox rights in Exchange 5.5 #2
What is the most restrictive set of rights that would allow an administrator to move mailboxes between 2 servers in the same site? Providing the administrator an admin role on the Servers container, on each server, or on the Private/Public Information Store gives him undesired privileges (like changing default storage limits). Thanks in advance for any assistance. ...

Form/Subform question...
Here's what I want to do and it would seem that Main Form / Subform would be the way to go. I have a table that contains information about a customer. I would like to be able to select the Customer in the main form. Then on the subform have the Customer data shown for the Customer in the Main Form. The client does not want to use Record Selectors as the number of clients can be large and they like the dropdown box functionality. So the question is: How do I set up a Form/Subform to accomplish this? The main form has only the dropdown box which contains the Primary Key and Custo...

Importing Data Files
Hey all, I have recently had to undergo a clean install of Windows XP onto a new Computer, and am having trouble importing all my MS Outlook XP data into XP (from 98SE). Thanks, -- Daniel Becroft ; ================================= "Real computer scientists don't comment their code. The identifiers are so long they can't afford the disk space." "Blue sparks and white smoke, the two most expensive components of any electrical system, and once used up will cost a fortune to replace." What is the exact issue? You can connect to the file by File -> Open -> ...

tab on forms
Hi there I ran out of room on the form. Is there a way to easily add a tab for another page on a form? Or is there a way to make a form larger? -- Thank-you! Ruth Ruth wrote: > Hi there > > I ran out of room on the form. > > Is there a way to easily add a tab for another page on a form? Or is > there a way to make a form larger? On the same toolbox bar where you can add TextBoxes, ListBoxes, etc., is a TabControl. You will need to add the TabControl and then Cut and Paste the desired controls to each TabPage. NEW controls can be dragged and dropped onto TabPages...

Import Excel Data from another workbook or file
Is there a way to import or export Excel Data between 2 different workbooks? E.G. Import from "File A" 'Sheet1' Column A, Row2 to "File B" 'Sheet1' Column A, Row 2. What I'd like to do ultimately is import data from 5 excel files into one. tamato43 wrote: || Is there a way to import or export Excel Data between 2 different || workbooks? || || E.G. Import from "File A" 'Sheet1' Column A, Row2 to "File B" || 'Sheet1' Column A, Row 2. || || What I'd like to do ultimately is import data from 5 excel files || in...

Local profiles + Outlook data
Could someone please refer me to step-by-step instructions on moving Local Profiles and Outlook data into Exchange 2003? I have a small group of XP users that I need to move into a new Active Directory domain, and import their Outlook data + IMAP mail from a BSD server to Exchange 2003. I've built the AD domain; added user accounts and configured mail routing between Exchange, Postfix+Courier, and the outside world; and have DNS zones, VPN access, etc. all working. Next I need to: 1 - move each Windows Box into AD, (okay, this one is easy) 2 - move their login profile into AD, so tha...

Outlook 2002 Email scanned forms attachments.
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C7229D.9BA6D3C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What is the best procedure to attach a preprinted form(example contract) = to an email? I have scanned the form with HP software but not working. = I think I have setting problems. I am scanning JPG. I need the same = size attachment as the original form. Not all recipients have a fax = machine. The HP software does have a email option but looking for other = alternative ways or software. I am sca...

moving companies moving loans moving budget
moving companies moving loans moving budget http://www.movingcompanies.co.il ...