473,804 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I move input data from one place in a form to a specified field in a table.

6 New Member
I am trying to design a form in which a category (field in a table) is selected from a combo box, then a value for that category is entered in a form field. I want that value to be placed in the field selected from the drop down list in the combo box. It would be like what happens when a bookkeeper selects an account field from a list and then enters a value for it. The value is then appended to the specified account field. I think this should be something easy, but I can't figure it out. I have made forms where an input field matches a table column, but I can't figure out how to specify the column (field) and then have the value go there. I would like a user to have just a couple of places to deal with in data entry instead of a massive form. I am pretty inexperienced with Access. Maybe I know only enough to be dangerous. :-/ Thanks.

I have Access 2003 running on XP Pro
Nov 8 '06
14 1936
MMcCarthy
14,534 Recognized Expert Moderator MVP
OK.... the code now looks like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Go_OnClick()
  2. DoCmd.RunSQL "UPDATE Transdistribution SET [" & Me.Account_Name & "]= & Me.Amount"
  3. End Sub
This says make account_Name field in Transdistributi on = Amount

Because you haven't specified which record you want to do it in with a where statement it will change every record to that amount.
Nov 10 '06 #11
rbowman40
6 New Member
Hmmmm . . . I better go back to the first code. Can't do it this afternoon though. Thanks for all you help to this point. Sorry I'm sort of thick about this.
Nov 10 '06 #12
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hmmmm . . . I better go back to the first code. Can't do it this afternoon though. Thanks for all you help to this point. Sorry I'm sort of thick about this.
Another possibility to try is something like

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Account_Name_AfterUpdate()
  3.  
  4.    Me.Amount.ControlSource = Me.Account_Name
  5.  
  6. End Sub
  7.  
  8.  
This will only work if the form is bound to table Transdistributi on and the current record being viewed is the one you want to update.
Nov 10 '06 #13
NeoPa
32,579 Recognized Expert Moderator MVP
OK.... the code now looks like this:

Code:
Private Sub Go_OnClick()
DoCmd.RunSQL "UPDATE Transdistributi on SET [" & Me.Account_Name & "]= & Me.Amount"
End Sub


Did I do that right?
I know this is going a way back in the 'conversation' but this looks like you're trying to set the name of the account to an ammount or numeric value.
Is this really what you want?
If you specify your table layouts (list relevant fields) and form to be used (list relevant controls) then we can put something together for you. It's much easier to work with named specifics.
Nov 11 '06 #14
MMcCarthy
14,534 Recognized Expert Moderator MVP
I know this is going a way back in the 'conversation' but this looks like you're trying to set the name of the account to an ammount or numeric value.
Is this really what you want?
If you specify your table layouts (list relevant fields) and form to be used (list relevant controls) then we can put something together for you. It's much easier to work with named specifics.
Hi Adrian

I understood that the combo box had a list of field names relating to certain type of accounts and the figure could be assigned to different fields depending on requirements. Therefore, the combo box has a list of the relevant fields.

I may be wrong??

Mary
Nov 12 '06 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1809
by: Willoughby Bridge | last post by:
Hi - Having trouble getting a multipart series of forms to move to the next form. The problem line is: <form method="post" enctype="multipart/form-data" action="Data_Form1.php"> If the "action" parameter is set to the current form (Data_Form1.php) then the data posts to the table correctly, but it does not move to the next form If the "action" parameter is set to the next form in the series then by clicking "submit" it moves to the...
4
3022
by: Justin Lebar | last post by:
Sorry about the huge post, but I think this is the amount of information necessary for someone to help me with a good answer. I'm writing a statistical analysis program in ASP.net and MSSQL7 that analyzes data that I've collected from my business's webpage and the hits it's collecting from the various pay-per-click (PPC) engines. I've arrived at problems writing a SQL call to generate certain statistics. Whenever someone enters our...
6
2509
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new products). Tables: tblCategoryDetails CategoryID SpecID
3
1885
by: Eric | last post by:
When i run my query it transfer last 4 digits of account number from one table to another and its wrong. There are two tables one i use for parsing. Second thru query i use to move data from temp table to actual table with some little changes in temp table. I use the same code in two different databases One database works fine and another database wont move the account number with 9 digit size. Difference is only the structre of text files...
1
1262
by: AMDRIT | last post by:
Occasionally I try my hand at a simple data storage engine. Today I ran across an article on the web http://msdn2.microsoft.com/en-us/library/aa289151(vs.71).aspx, and it got me thinking again. There doesn't seem to be a definative source, at least on in layman terms, on this subject. Here is what I believe to know so far. (As if I was to model after SQL Server).
0
2496
by: prasenjit2007 | last post by:
I have a main form for inputing the (to/from/mesg/file) with the following code:- <html> <body> <table> <tr> <td>To:</td> <td><input type="text" name="to" size="50" value="pras_sandilya@rediffmail.com"></td> </tr>
1
4009
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. Depends on the pull down list selection, I use script.aculo.us to validate the user input before submit and pass the necessary data, such as contact type, contact information and ranking to a php program for updating. This form should allow multiple...
3
2757
by: Guig | last post by:
Hi, I have a problem with one of my form. I want to record some data in a table by using a form. One of those data it is the time and I want to use an input mask to be sure that everyone will enter the data in the same way. There is my problem: After the first digit I'm entering in the field, the message error "The value you entered isn't appropriate for the input mask '99:00\ >LL;0;_' specified for this field" appears. I'm pressing "OK"...
21
7990
by: DanicaDear | last post by:
I've been trying to figure this out for three weeks. I've been sleeping on it. Not getting answers, just losing sleep. ;-) In a table, I have a field COMPANY_EMAIL. In this field I want to allow up to 8 characters, use the same domain always, and in a form be able to click and open an email to this customer. I have tried this in numerous ways, and I think it's occuring to me finally I can't do everything in one place. I think I might...
1
10356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10099
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3003
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.