Fill text boxes with data from another text box

I have a form that has two sections. Section 1 has orginator name, address, 
city state, zip. Section two has owner name, address, city, state, and zip. 
If orginator and owner are the same, I want to just hit a button or check 
mark to copy data from section one to section two. Can this be done, and how 
would you do it.

Thanks for your help-
Porkchop. 


0
Porkchop
3/18/2008 1:31:25 PM
access 16762 articles. 2 followers. Follow

2 Replies
1114 Views

Similar Articles

[PageSpeed] 36

Porkchop,

To copy data from one control (and, hence, field, if the form control source 
is set to the name of a field in the form's underlying record source), put 
the following in the AfterUpdate event procedure of the checkbox:

If MyCheckBox = True Then
    ' Set the second control's value to that of the first
    Me![MySecondControl] = Me![MyFirstControl]
Else
    ' User has unselected the checkbox; set to blank
    Me![MySecondControl] = ""
End If

It sounds, however, that you may have another issue, depending on what this 
form is for.   It's likely that you should have a People table that has the 
name, address, city, state, zip, phone, etc., and that you should only need 
to add the primary key of that table into the Originator and Owner fields of 
this form.  That way, all of the fields related to the person are stored only 
once, avoiding data anomolies caused by typos or minor variations in 
spelling.  For example, if different data entry people enter "GE", "G.E.", 
"Genl. Electric", "General Electric", than any searches or totals of data in 
the underlying record source of the form will have to look for all of these 
permutations.  

What kind of data is the form capturing?

Hope that helps.
Sprinks


"Porkchop" wrote:

> I have a form that has two sections. Section 1 has orginator name, address, 
> city state, zip. Section two has owner name, address, city, state, and zip. 
> If orginator and owner are the same, I want to just hit a button or check 
> mark to copy data from section one to section two. Can this be done, and how 
> would you do it.
> 
> Thanks for your help-
> Porkchop. 
> 
> 
> 
0
Utf
3/18/2008 2:12:12 PM
Sprinks,
This is actually a sub form. This sub form captures manifest information. 
The Orginator of the load and the owner of the load or facility. Somtimes 
the orginator is the same as owner and somtimes not. I just wanted to make 
life easier. Yes I agree about the People table, but not all are aready in, 
as we get new customers and shippers. So this table is called Manifest info. 
The main form is called Daily log, and table is called Daily log. And TYPOS 
abound!

So now the question is, where do I enter the code, in code builder? Do I 
need to change code to fit my sub form? I admit I'm little new to this.

Thanks for your help!
Porkchop





"Sprinks" <Sprinks@discussions.microsoft.com> wrote in message 
news:754FC562-7A1C-40BF-8D12-93E4895DA3EC@microsoft.com...
> Porkchop,
>
> To copy data from one control (and, hence, field, if the form control 
> source
> is set to the name of a field in the form's underlying record source), put
> the following in the AfterUpdate event procedure of the checkbox:
>
> If MyCheckBox = True Then
>    ' Set the second control's value to that of the first
>    Me![MySecondControl] = Me![MyFirstControl]
> Else
>    ' User has unselected the checkbox; set to blank
>    Me![MySecondControl] = ""
> End If
>
> It sounds, however, that you may have another issue, depending on what 
> this
> form is for.   It's likely that you should have a People table that has 
> the
> name, address, city, state, zip, phone, etc., and that you should only 
> need
> to add the primary key of that table into the Originator and Owner fields 
> of
> this form.  That way, all of the fields related to the person are stored 
> only
> once, avoiding data anomolies caused by typos or minor variations in
> spelling.  For example, if different data entry people enter "GE", "G.E.",
> "Genl. Electric", "General Electric", than any searches or totals of data 
> in
> the underlying record source of the form will have to look for all of 
> these
> permutations.
>
> What kind of data is the form capturing?
>
> Hope that helps.
> Sprinks
>
>
> "Porkchop" wrote:
>
>> I have a form that has two sections. Section 1 has orginator name, 
>> address,
>> city state, zip. Section two has owner name, address, city, state, and 
>> zip.
>> If orginator and owner are the same, I want to just hit a button or check
>> mark to copy data from section one to section two. Can this be done, and 
>> how
>> would you do it.
>>
>> Thanks for your help-
>> Porkchop.
>>
>>
>> 


0
Porkchop
3/18/2008 4:51:16 PM
Reply:

Similar Artilces:

Filling cells in between pairs of numbers
Hello all, I am trying to find an easy way to fill in cells in between pairs of numbers each of which is exactly the average of the pair's difference averaged by the number of these cells greater than the previous. So I have 1 1 2 3 4 8 5 6 7 8 20 9 10 12 13 14 15 45 I want: 1 1 2 3.333333333 3 5.666666667 4 8 5 11 6 14 7 17 8 20 9 23.57142857 10 27.14285714 11 30.71428571 12 34.28571429 13 37.85714286 14 41.42857143 15 45 I know I can do a Fill, Series, but then even with a macro that does a "control shift up fill series enter",...

ISBN data type
Hi--I am setting up a book lending database for our small non-profit. ISBN's (identification numbers unique to every book) recently went to 13 digits. I want to use the book's ISBN as the primary key for tblBooks, but it is too long for the Long Integer data type, and when you choose Single or Double as the type, it displays the ISBN with an exponent, i.e. 9781564205223 is displayed as 9.781565E+12. Is there any way to "force" Access to display the number as written? Thanks, lcnlit lcnlit <lcnlit@discussions.microsoft.com> wrote: >Hi--I am setting up a book...

Shapes/Text
How can i make words in the shape of a heart (for example) I want my words to illustrate a shape. Please help. You really can't, Publisher can add text to a shape, but only as a rectangle. If you have patience I have a method on my web page that shows how to do text in shape of a heart. Takes some work. Scroll way to the bottom of the page. http://msauer.mvps.org/more_graphics.htm -- Mary Sauer http://msauer.mvps.org/ "ShapeUser" <ShapeUser@discussions.microsoft.com> wrote in message news:CABE22F7-82BF-40C9-8125-09E088C090C6@microsoft.com... ...

Wrapping Text in Excel
I have tried the following techniques to wrap text in excel. I have followed them exactly as shown and in that order. The process works fine in a workbook. When I move to another workbook the Wrap text style is gone from the Style box. How can I make it stay permanently for all workbooks? Adding a Shortcut to Excel for Wrapping Text Step 1: Adding the Style Box to the Formatting Toolbar: 1. Right-click one of the toolbars, and select Customize. 2. Select the Commands tab, and then select Format. 3. Drag the Style icon from the Customize dialog box to the Formatting toolbar, and drop it n...

Case filled out from SharePoint
I need to have a simple form my users fill out to submit a case. This would include the Business Required fields on the CRM Case form. Is there an easy way to do this using SharePoint? In other words, the user would go to the SharePoint site, click a link to "Submit a Support Request". This would open a form (Infopath perhaps?) where they fill in a few simple items, click submit, and a new CRM Case is created. This then would fire any pertinent workflows as if the case had been created from within CRM itself. I'm aware there are 3rd party solutions out there but would...

Sending data to SQL Server
Hi, I am building a solution to allow a user to upload shape data to SQL Server and I have a couple of questions. 1) Is it possible to include more attributes than just the shape data, but also details of the process model file such as it's title, version, etc? I could do with having the file name in every column of shape data for example. 2) It's quite a few clicks to export the data to an SQL database (about 5 or 6). Is there a way to have this feature available say next to the floppy disc save icon? Steve Since you're building a solution, then you understand t...

how to i create a dialog box using xml schema
i want to able to display login dialog box when the user opening my word document. The dialog box will be created by using Xml schemas or wordML. ...

Matching cells by content then cell fill with color
Thanks to JEM, I am using this routine to color three consecutive cell a specific color, in this case red: Public Sub ThreeCellsRed() ActiveCell.Resize(1,3).Interior.ColorIndex = 3 End Sub What I need now is a way for the routine to continue to find all th similar cells, let's say for sake of disc they are people's names, s when I execute the above on my name, mrh, I want it to continue in th worksheet and find all exact matches and color those same cells red. Another thought, say my name (MRH) is in "A1" and it is also in "D1". But in "D1" I use "...

column charts with multiple data sets
My data set is below. I want to show column charts: The first one would be Product A for August made up of data for versions 1-4, column two would be Product A for September made up of data for versions 1-4. The third column would be Product B for August made up of data for versions 1-4, column four would be Product B for September made up of data for versions 1-4. Product Version August September A 1 30,812 365,874 A 2 59,650,018 56,404,138 A 3 29,931,636 28,053,084 A 4 71,972 62,352 B 1 7,094,967 11,718,925 B 2 9,588,255 ...

Transparent text boxes
I have text boxes which have a fill color yet transparent center and then an image behind the text box. On the screen it shows up perfectly, yet when I print it the image is blocked. Any ideas? Thank You Publisher has issues with transparency. Create a rectangle the size of your text box, apply your transparency, right-click, save as picture, select the .png format, re-insert the saved image into your publication. -- Mary Sauer http://msauer.mvps.org/ "Sam@Postnet" <Sam@Postnet@discussions.microsoft.com> wrote in message news:2C9504A9-C26E-4025-8320-405ADE655DBC@mic...

Message box error check box
I have built a databse, on a form i have a close button i want to do a few checks to see if certain text boxes have data in them. I would want message box and then i want it to set focus to that box ( and highty llight it in red if pos) I have about 10 checks to do on every form that the best way to do this "Simon" <S.Dickson@shos.co.uk> wrote in message news:f628c1d7-0598-4d75-bc3a-6c41df313870@m16g2000yqc.googlegroups.com... >I have built a databse, on a form i have a close button i want to do > a few checks to see if certain text boxes have data in the...

list of emails into text file
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Is anyone aware of a way I can copy a selection of emails from my inbox and paste into a text file or new email body. <br><br>So if my inbox shows 10 mails, I'd select all 10, copy, and paste into a file the subjects, date and times of each mail. <br><br>This would be great, and I'm sure a script is possible but I've no idea where to start. <br><br>Thanks in advance! On 2/26/10 1:25 AM, Smallbadger@officeformac.com wrote: > Is anyone aware of a way I can copy a se...

From field filled in
Hi and thanks in advance for this help. I am using Office 2003 with Exchange 2003. I have a second mailbox setup in my profile. When I reply to an e-mail sent to the other inbox, the From field is automatically filled in with that name. So for example, if the other inbox is "HelpDesk" and I reply to an e-mail in that inbox, the from field is automatically filled in as "HelpDesk". Hope that makes sense. Thanks!! <twytch111@gmail.com> wrote in message news:1175611189.053649.28340@q75g2000hsh.googlegroups.com... > Hi and thanks in advance for this help. I am...

Full-Text
I am getting an error that says "Specified Module not to be found" when choosing full-text indexing tab in Exchange System Manager. My system is Exchange 2003, and Windows 2003. Picture screenshot is attached. ...

Frozen message in Drafts box
With WLM on Windows 7, I have had 2 instances of a message in the Drafts box appearing to be frozen. I could not set the cursor into the existing type to edit. All I could do was highlight the type. Any ideas as to what might have caused this and how to get out of the situation would be welcome. In a related question, I have often gone back to a message in the Drafts box the original of which contained emoticons (smileys) and found the draft only contained placeholders (albeit with full description), but not the actual emoticons. How do I recover from this, without having to rein...

Have one fill to auto fill aother
My question is simple. I would like to have field 27 = field 25. So when someone enters the data for field 25, the same data auto populated in field 27. Any help is appreciated! Kaylen, In the CotrolSource for Field 27 type... =[field 25] ....assuming of that you are talking about a form in Microsoft Access or did you mean to post this question in the Excel newsgroup? -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Kaylen" <Kaylen@discussions....

Colours changing in the fill palette and the spreadsheet?
Hi I have a user with Office 2003, and her pc and build is standard as with her colleagues. In Excel the colours would change (cells filled) also if the user goes to her pallette the colours have also changed. Desktop and all other applications colour are fine. The following resolutions have been tried - office detect and repair, updates, asked the user to got to the tools options and reset the pallette and this does not work. She has to log off and back in again in order to set it back to the proper colours. Again this is only affecting Excel? Any pointers? I wish to thank you in advanc...

Inserting multiple rows into a table while maintaining data?
Please trust me, this is a relatively simple question, but takes some explaining: I want to insert multiple rows (anywhere from 60 to 900+) into a table that I routinely use off a template. Every time I open the template, I have all my appropriate column headings, and I paste data from another program into this Excel sheet. My desired outcome is that I am able to paste rows of varying numbers, while still maintaining the last rows (for sum totals of each column) on my template. (This would help automating the task) For example, I start my column headings in row 6. A6, B6, C6, and D6 all ...

Looking up and matching data
I have two sets of data with the same information but not in the same order and am trying to match the data. In each data set I have 10 pools containing 100 loans. Each pool has a unique ID and each loan within the applicable pool has an ID of 1 to 100. I need to look up the Pool ID, then look up the loan ID so that I can extract the property type information from a third column. The Pool ID and property type is text but the loan ID is a number. I am struggling to put together the right combination of formulas to give the property type for each loan within each pool. Any suggestion...

Operating fill handle and moving entire cells with keyboard
Is there any way of operating the fill handle or moving entire cells/range of cells with the keyboard rather than using the mouse (drag and drop). Thanks, Tom. Tom Copy or Cut Select range Select top left corner of range. Hold Shift & press End, Arrow down or right. Copy:= Ctrl + C Cut:= Ctl + X Paste Ctl + V To Fill Down or Right Ctrl + D or ctrl + r Use Excel Help and search for keyboard shortcuts for a complete List. Regards Peter >-----Original Message----- >Is there any way of operating the fill handle or moving >entire cells/range of cells with the keyboard rathe...

Missing "Save Embedded Files dialog box"
I am using Frontpage 2003 (portable). After replacing my harddrive and reinstalling Frontpage 2003 I am unable to upload pictures to my website. The "Save Embedded Files dialog box" is missing and does not come up after adding a new picture to a page and saving. Suggestions? Import your images into FP web/site first (into folder of your choice), then place them into your design...you will never have a problem doing it this way. -- ~~~~~~~~~~~~~~~~~~ Rob Giordano Microsoft MVP Expression Web "USKDMMA" <USKDMMA@discussions.micro...

Transparent Chart Data Series
Dear all, I'm having problems formatting an area chart that I have created. Give that there are two series of data on teh chart and a times one dip behind the other, I want to make one of my series' transparent However, whn I go to the fill effects option of the format data serie menu, transparency is not an option that is available - it is al "greyed out". Anyone got any ideas why this is, and how I can make it an activ option? Thanks, Stev -- stevepai ----------------------------------------------------------------------- stevepain's Profile: http://www.excelforum...

Removing text from part of a field
Good morning, I have a table with a field that contains the following: PAGE_03 PAGE_03A PAGE_01 I need to create a query that can remove the text "PAGE_0" from the field. Thanks, Fred Mid([YourFieldName],7) -- Rick B "fgwiii" <fgwiii@discussions.microsoft.com> wrote in message news:C998F7AD-B562-48E7-8F23-4AB58D7E0657@microsoft.com... > Good morning, > > I have a table with a field that contains the following: > PAGE_03 > PAGE_03A > PAGE_01 > > I need to create a query that can remove the text "PAGE_0" from the field. &...

How disable an Excel dialog box?
My entire spreadsheet is locked/password protected in such a manner that users cannot select any locked or unlocked cells. However, if a user double clicks on any cell, Excel will display a dialog box that says the following: "The cell or chart you are trying to change is protected and therefore read-only!...." etc, etc.... Is it possible to disable this particular dialog box so I can display my own custom userform instead?? Can I somehow place some code in the "Worksheet_BeforeDoubleClick()" event subroutine to tell Excel to display my own cu...

linking a worksheet to one in another book
Done this before - but cannot remember how. Excel 2003 Workbook with 7 sheets, for wages, 1 sheet is a "master" and consists of the totals of the other 6 sheets. The master (plus other sheets from different workbooks needs to be sent to payroll bureau.) I cannot for the life of me remember how to make a sheet in a different book update with changes from this master sheet. I have followed the help files which suggest "paste special" but paste special is greyed out. Would be eternally grateful. (and a Happy new Year to anyone who helps - and even those who do not) Alec ...