Entering the same value into two table fields at the same time

Say that there is a table which has 2 fields (A, B)
There is a form [Form1] (data entry type) to enter data for A by
There is also one more `TextBoxB` which is Not Visible.

My target is to record the value of (entered thtough `TextBoxA`) into
B field of the table as well.
So I write down a code "Before Insert" of the Form1 that:

" Form_Form1.TextBoxB = Form_Form1.TextBoxA "

It is not recording A values into the field B... Where am I wrong? Can
you help me please?

9/3/2007 12:31:30 PM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 5

Sory !!!
When I write down the same code into `OnExit` of TextBoxA, it is

9/3/2007 12:37:50 PM
yes, that will work, but i'd recommend that you use TextBoxA's AfterUpdate
event, rather than the Exit event - that way the code runs only when data is
actually entered or edited in TextboxA, rather than every time you Exit the

though i must say that it seems very strange to me that you are storing
duplicate data in your table.


"mezzanine1974" <savas_karaduman@yahoo.com> wrote in message
> Sory !!!
> When I write down the same code into `OnExit` of TextBoxA, it is
> working...!!

9/3/2007 4:09:53 PM
Hello Tina,

Related table refers to "RequsitionTable"
TextBoxA - refers to Project Manager who makes the requsition.
TextBoxB- dublicates the Project Manager in the same table

TextBoxA actually receives its data from the related table
(TblProject). (it is combo box actually to prevent user from mistake)

I considered that if the Project Manager will change in the future, I
would like to keep original Project Manager in the dublicated field
(TextBoxB) who made requsition before. Otherwise, when the Project
Manager is changed in the TblProject, all its related data in the
RequsitionTable to be updated automatically including items from very
beginning of the table.

You may help me to build an adequate relationship for this issue?
Because I am aware of that I am breaking some basic rules of the
database approach.

9/4/2007 7:53:29 AM

Similar Artilces:

Cannot Delete rows in AsyncOperationBase table (MSCRM DB is 73GB on SBS)
In my ignorance, I let the MSCRM database grow to a huge size. I became alarmed at 58GB and 2 days later it was 73GB. With the help of my solutions partner, we found out that we have to manage the size of my AsyncOperationBase table by deleting old completed rows. The scripts always timeout. Then I decided to try and delete just one row using SQL Management Studio. Here is the error. No rows were deleted. A problem occurred attempting to delete row 1. Error Source: .Net SqlClient Data Provider. Error Message: Timeout expired. The timeout period elapsed prior to completion of the operati...

How do Load at Run Time DLL's work?
In the example of dll's loaded at runtime they use LoadLibrary and GetProcAddress. The LoadLibrary works for me, but the GetProcAddress doesn't. Well it did for a short time yesterday for no apparant reason, then it quit and wont work today. Anyway, when it was working, the parameter wasn't passed correctly to the dll function. So how does the compiler know what the parameter list is for the dll function? I don't have an h file included or anything to tell the calling program what the parameters can be. Here some some code from the dll In MEP.h class CMEPApp : public CWinApp...

Deleting unicode fixup table
One of our clients has an Exchange 2003 Std SP1 installation that just bumped up against the 16Gb limit. We had them do some house cleaning and did the 17Gb hack to get them temporary extra space which got the system back on an even keel but when we tried to do the offline defrag to compress their database the result showed us it was corrupt and failed about 10% into it. The store mounts and runs fine and backs up OK but we are unable to defrag and now we have concerns that bad things are on the horizon. I know everybody says the best thing to do is a restore from b/u if at all possible and ...

automating a pivot table
When using a pivot table, is there any way of automatically selecting from a drop down menu. By this I mean if I can select one of 5 colours, If I put "red" in cell A1, can the pivot table be made to take the value in cell A1 as the colour selection, rather than me selecting red from the drop down list. thanks in advance You can add fields to the page area. When you select from the dropdown list in a field there, the table is filtered to show only that item. bobf wrote: > When using a pivot table, is there any way of > automatically selecting from a drop down menu. &g...

Using Form to update table
Hi I am a little lost. I have a form which has a subform. In the header of the form there is a combo box to selete numbers and a text box to enter a date (not current date) On the subform I have 2 text boxes which onces the 2nd textbox is populated another set is to come underneath ready for completion (continues form). On the main forms footer I have an update button which is to perform a task. What I am lost with is how can I get the subform to work as a continues form so once the 2nd text box is completed another set is ready for entering. and How do I then click on the button to fi...

What is best way to determine whether a value exists in a column of values?
Excel 2002 Hi What is the best way to lookup a value (i.e. a number) to see whether or not it is in another column of values? I need exact matches only I cant get lookup() to work... With thanks Ship Shiperton Henethe Strangely enough I have now discovered that the function =countif() seems to work quite well! Ship Shiperton Henethe ...

Two Questions Regarding Bills
In Money 2006, if you have a recurring deposit every two weeks set in the "Bills Summary" it would show both occurrences for the month. I have currently have Bill Settings set to 45 days and I can still only displays one occurrence of the deposit at a time. How can I fix this to properly show both deposits? Secondly, is there any way to print the "View bills and deposits on the calendar" view? I would like a hard copy of each month's calendar of bills and deposits. Thanks for any help!! ...

Pivot Table based on external (.mdb) database
Can you point me to an article/tutorial regarding creation of Pivot Tables based on imported .mdb data files? Thanks! Hi, Try http://edferrero.m6.net/tutorials.html Ed ferrero "KG" <KG@discussions.microsoft.com> wrote in message news:12CA98CF-C52D-45BD-AF7B-7EC527C5FB18@microsoft.com... > Can you point me to an article/tutorial regarding creation of Pivot Tables > based on imported .mdb data files? > > Thanks! Perfect! I'll need to do a little studying... "Ed Ferrero" wrote: > Hi, > > Try http://edferrero.m6.net/tutorials.html &g...

Combining two fields into one in a query for a report
The database I am working on is to keep track of parts that are either in their storage area (on a shelf) or on an assembly line. I have two fields, one called Shelf and every part has a shelf assigned to it. The other field is Line and if a part in on an assembly line, there is a number indicating that line, if the part is on it's shelf, the word STOCK appears in the line field. (Has to be this way for the rest of the database to work, so this is not up for question) Now, I need to creat a report to show where all parts are. If they are on a line the result needs to show the l...

Combo box to control two sub forms
I have a combo box on a form that I want to control the data viewed in two sub forms. The combo box list months in the mmm format. One of the sub forms is requests that have been approved with the date (mmm-yy) the other sub form is requests that have been denied with the date (mmm-yy). When I select Jan from the combo box, I want the sub forms to display only the records having to do with that month. Is this even possible? Your combobox provides only a month criteria while your data is both year and month. That's not a problem except when you select a month, your subform d...

tables that link manufacturing to SOP
Hi All, I have recently joined a company that is using the manufacturing module in Great Plains Dynamics. While I have very familiar with all the standard tables ( especially the SOP30200 and SOP30300) having designed many Crystal Reports for them, I cannot seeme to find the correct way to link an order to a manufacturing order. I have found the IS010001 - ICON Sales Order Line, and the IS030001 - ICON Sales Order Line History files. The issue I am having is that these 2 files seem to replicate not only the manuafactured item, but also any other lines on that order. So am I using th...

Excel 2002 Pivot Table Protection
I've been playing around with protecting my pivot table - so far, I can't get it quite right. What I'm hoping to do is allow users to refresh the pivot table and update any of the "page" dimensions, but NOT allow anyone to pivot or manipulate the row and column dimensions. Is this possible? You could use programming to restrict the pivot table use. For example: '========================================= Sub RestrictPivotTableExceptPage() Dim pt As PivotTable Dim pf As PivotField Set pt = ActiveSheet.PivotTables(1) With pt .EnableWizard = False .EnableDril...

Using Access 2003 Run-Time Version
I am trying to use the Access 2003 run-time and almost everything seems to be working just fine. I have noticed however that I seemed to have lost the ability to right click on a report and bring up the options of print/email.... When I right click using the run-time versionm nothing displays (as if the right button is disabled). When I right click using the regular mdb (full access 2003) all the options appear and I am able to print/email/etc at this time. My main question is is there any way to get the right click options back in a run-time version. Thanks That's correct: the run...

simulating columns in rtf field on report
I am creating a system using Access 2007. I have a report which currently displays multiple RTF fields. Within one of the fields, I would like to print a 4-column 4-row table (including borders) to display some data. I need to do this in VBA as the data will vary. Does anyone know if this is possible. Even if I could get the data into a column format (without the borders), that would be an achievement. Any ideas would be appreciated. ...

Compare two table
Hi, I had transfer a table from the server database to my local computer. Is it possible if use excel to compare those two tables and extract the missing records that were not copy out? regards, ray -- ray5_83 ------------------------------------------------------------------------ ray5_83's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29800 View this thread: http://www.excelforum.com/showthread.php?threadid=495113 Maybe... Can you pick out a key field/column that is common to both? If you can, you can use some of the techniques that Chip Pearson descr...

Display Color Hex Values in a DropDownList
How can I populate a DropDownList with the Available Color Hex Values while displaying the Color? I'd like to allow my users a way to set a color profile. Thanks Hello, The problem being exactly ? Is this to get the hex values or to display a color for each item or to enumerate available colors ? You also have ColorDialog (http://msdn.microsoft.com/en-us/library/system.windows.forms.colordialog.aspx)... -- Patrice "Dave" <Dave.Burkett@Jacobs.com> a �crit dans le message de news:f8e3e0b5-1b54-49b4-85db-079e8ea7d2bf@19g2000yqu.googlegroups.com... ...

Setting Value Of One Cell Equal To Value Of Selected Cell
Without using VBA - If cell A1=red, A2=white and A3=blue, can I set C1 to be the value of the selected cell so that if A1 is selected, C1 will equal red, if A2 is selected, C1 will equal white, etc.? Thanks, Sheldon Potolsky Sheldon, In a word, no. No worksheet thing comes to mind that works as a function of the active cell. You might want to use some radio buttons or a list box (Forms Toobar or Control Toolbox) instead of cell selection. They'll let you click to make such choices, and you can use formulas that will change a cell value as you wish. -- Regards from Virginia Beach, ...

Promt before changing a value
I was asked the below question by someone and was wondering if you guys have any advise I can relay to him. "I am looking to create something, most likely with VB code, in excel that will pop up a dialog box to warn the user that they are changing the quantity of a part by a more than normal amount. For example, if the current inventory quantity for a specific insert is 10,000, then if that cell is changed by more than 3000, a dialog box will appear to prompt the user to double check their change. So, if that cell is changed to 13,000 or higher, or, 7,000 or lower, the dialog box will ...

Stop entering data if a specific field is Null
Hi I have a table where there is one field named "Apartment" I have put required Yes for this field. Here is the problem and I am surelly not the first to ask that. Right now, user can fill all fields and when he wants to add a new record, system tells that the "Apartment" field must be entered unless the record will not be saved. To add a new record, user have to click a button. When he clicks, focus goes on the "Apartment" field. What I want is if user don't fill the "Apartment" field he will not be able to go to other fields...

Excel Cell Format for Numberic Values
When I export data having 20 numeric characters, Excel will put in place a scientifc equation. The numbers are rounded off after 15 characters. Cannot get Excel to display all 20 numeric numbers. Any ideas on how to get Excel to read all 20 numbers in a cell? Hi not possible. Excel only supports 15 significant digits -- Regards Frank Kabel Frankfurt, Germany "Al" <Al@discussions.microsoft.com> schrieb im Newsbeitrag news:4324528D-BBAB-493C-A1B0-EC108BCB6571@microsoft.com... > When I export data having 20 numeric characters, Excel will put in place a > scientifc e...

Restore pick list values
We edited the invoice 'status reason' picklist ( actualy deleted some values ) and modified others. This we have done on other picklists with no problems. However we have noticed that when this attribute is displayed on selection lists the text displayed is not the same as that on the picklist. We now presume there is code behind particular list values and want to restore the old values with the same list value. We have a backup of the DB available through enterprise manager and can see the missing records there in STRINGMAP and STRINGMAPBIT . We are missing values 4,5, 6 and a...

using two different outgoing servers
is it posible to set up one idenity to send mail by two smtp servers I use diferent isp at work & at home & wish to be able to send mail from both sites currently I have to either switch identies or change to outgoing server details "test" <test@hotmail.com> wrote in message news:433b4f0f$0$22741$afc38c87@news.optusnet.com.au... > is it posible to set up one idenity to send mail by two smtp servers > > I use diferent isp at work & at home & wish to be able to send mail from > both sites currently I have to either switch identies or change to &...

Order Table
HI, I have some questions regarding integrating web store with RMS... 1) Why can´t I see the "Order Table" when I query it in the Administrator? I have the structure but there is no PUBLIC_ equivalent and it returns a syntax error when I do a SELECT * From Order 2) What are the reference number and channel type fields in the "Order Table"? 3) What are the values for the Status field in the "Exchange Table"? In the docs I have only found that 1 means the order is processed. DOes 0 means it is not processed? are there other values? 4) I am integrating O...

reset the value of a spin button
Q: How can I reset the value of a spin button with out setting off the CHANGE event? I am using Office Pro 2003 and have tried the following with out success: Application.EnableEvents = False spnButton1.Value = VarX Application.EnableEvents = True Option Explicit Private fNoChange As Boolean 'other code Private Sub spnButton1_Change() If Not fNoChange Then 'change code End If End Sub 'more code fNoChange = True spnButton1.Value = VarX fNoChange = False -- HTH Bob "cubbybear3" <n4213l@gmail.com> wrote ...

Count values either vba or formula
Sample of what I am trying to achieve: Worksheet1: (column A, B, C, D, E) - source data id,primary region, secondary region, tertiary region, status 111,americas,new york, NA, increase 111,americas,canada,NA, increase 111,americas,mexico,LATAM,increase 111,americas,peru,LATAM,decrease 112,europe,france,WEST,increase 112,europe,spain,WEST,decrease 112,europe,uk,WEST,decrease 112,europe,portugal,WEST,decrease etc.... Worksheet2: (contains summary sheet) - summarize data 111,americas,NA, increase, 2 <----- count instances found from worksheet1 111,americas,LATAM,increase, 1 111,americas,LA...