473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Adding data from a text box to a table

Hello,

I have a text box with a dlookup function in it. I am having trouble trying to get the information in the textbox to the table.

The table is called Password_Reset_Data the field I am trying to insert the data to is "Classification_Type"

The text box's information is:
Name: Classification_Type
Control Source:
Expand|Select|Wrap|Line Numbers
  1.  =DLookUp("Classification_Type","Ticket_Classifications","Classification_Id=" & [Forms]![Password Reset Intake Form]![Classification_Id])
Is this something where i can set an event in the "After Update" Area within the property sheet?

Thanks
Dec 11 '13 #1
3 2522
zmbd
5,501 Expert Mod 4TB
Out of curiosity, May I ask why?
You have the data stored once, why store it a 2nd time?
Duplication of data isn't normally something one does unless required for auditing or some historical reason such as when a variable discount is given and the current value needs to be stored against the recordset.
Dec 11 '13 #2
It is a pseudo ticketing system, as customers call in a ticket is logged with the number in a separate table, and that table gets exported to a auditing/metrics team.

the table needs to read like this:
ticket_id,customer_id,customer_name,secretariat,de pt_id,classification_id,classification_type,0

I have a list of the ticket classifications( [table].[Ticket_Classifications] ) in one table and that feeds the dlookup and combo boxes in a form that the Customer service personnel use and applies the entered data to the "Password_Reset" table.

The dlookup formula made the textbox, that was bound to the "Password_Reset" table, unbound. I'm trying to have the data that is the result of the dlookup to fill the corresponding cell for the record that is being worked on.
Dec 12 '13 #3
zmbd
5,501 Expert Mod 4TB
You can do the table export via a query; however, it sounds like there's more to this than "first meets the eye."

Lets' see if we can make this better... sounds like you need a bound ComboBox control here - for short CBO.

Wherein Lookup fields at the table level are frowned upon almost universially, in a normalized database, we need the equivalent at the form level (and often at the query level)... and the CBO is our friend!

CBO have two properties:
Control Source
Row Source

- In a bound form the Control Source would be bound to one of the recordset's fields

- The Row Source can be a list (for simple stuff), a query (either stored or embeded), or a table.

I have a form that shows an example of this here:
http://bytes.com/attachments/attachm...ead_943879.zip

KEEP IN MIND! That this DB was made in answer to BytesThread943879. It is only provided here so that you can see what I am talking about for the BOUND-CBO used in the form.

If you open the database, place the main form (it should open when you open the database) in design view.
In the details section, you'll see the CBO that are bound to the underlying recordset of the form.

Right click on the first CBO(actually any) in the details section and show the properties. Each CBO has an Embeded Select Query, You could just as easily taken the query and saved it as one of the stored queries and referenced the stored query or indeed one of the tables.
These provide a nice human readable text while setting the numeric value of the primary key from the related table.

So you should be able to do the same thing with your database.

Feel free to look at the remaining stuff in this database; however, most of it will not apply to your question.
Dec 12 '13 #4

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

Similar topics

2
by: srinik | last post by:
Guy’s, Adding Index to Table may reduce performance of Some Select? Thanks in advance, Srini
3
by: Andrus Moor | last post by:
To reproduce: run the following code in IE 6 and right-click in table. Observed result: Error : invalid argument at line var row = table.insertRow(0); Expected result: new row must be...
1
by: Brian Conklin | last post by:
Hello Eneryone, I am having a problem. I have written a little app that will take a text "pipe" delimited file and place all of the values in to an Excel spreadsheet. It works great on any of my...
0
by: Luis Esteban Valencia | last post by:
Hello I wrote a program with code behind in C# to add row into table dynamically and the program worked very well in .Net Framework 1.1. When I run this program in .Net Framework 2.0 beta...
10
by: Trevor | last post by:
Hey, I am trying to do this tutorial on the microsoft site : http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dndotnet/html/usingadonet.asp I can get everything to work up to...
2
by: Joe | last post by:
Anyone can suggest the best method of reading XML and adding data to ListView? Here is the xml data structure:: <xml> <site> <url>http://www.yahoo.com</url> <lastupdate></lastupdate>...
3
by: SimonHeffer | last post by:
I've added a DataGridView and added some columns in the designer, now I want to add some rows with data applied via column name. Having done some web trawling I've ended up with this: private...
2
by: canoewhiteh2o | last post by:
I am having trouble adding data columns to a disconnected database. I first load a datatable using: private DataTable dtMacros = new DataTable(); private ArrayList macro = new ArrayList();...
2
by: shimul | last post by:
Hi, Have table with data ( like a,b,c,d in column 1), want to read data from table and put in text box in continuous form. like tble name "tbltest" and textbox name "txtbox". now want to...
0
by: rahul more | last post by:
My aim is - Access data from table and show it into a form's textboxes , comboxes for edition of data. I am using listview. I am selecting particular row of listview by clicking on that row and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.