473,397 Members | 2,099 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,397 software developers and data experts.

Working with Tables

If i have one table box and I input say a number how can I make another box in that same table give me an automatic response?

Example:

Employee ID# 1 Returns in differant box as John Doe

I want to be able to input the 1st box not a drop down box or a combo box...
May 4 '10 #1

✓ answered by missinglinq

Originally you were talking about EmployeeIDs and EmployeeNames, so here's some sample code for that. You can modify it for your new "donot" scenario:

If EmployeeID is defined as Text

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtEmployeeID_AfterUpdate()
  2.  Me.txtEmployeeName = DLookup("EmployeeName", "YourTableName", "[EmployeeID] = '" & Me.txtEmployeeID & "'")
  3. End Sub
  4.  
If EmployeeID is defined as a Number
Expand|Select|Wrap|Line Numbers
  1. Private Sub txtEmployeeID_AfterUpdate()
  2.  Me.txtEmployeeName = DLookup("EmployeeName", "YourTableName", "[EmployeeID] = " & Me.txtEmployeeID)
  3. End Sub
Linq ;0)>

7 1900
NeoPa
32,556 Expert Mod 16PB
You would need to put some VBA code together in the AfterUpdate event procedure of the TextBox you entered the data into.

Welcome to Bytes!
May 4 '10 #2
Thank you for the welcome...

I am building a data base for my job and I am stuck on this(for weeks) If I put in a box a fill in number and I want a response in the box next to it that is a description for that number how can would I do that?
May 4 '10 #3
missinglinq
3,532 Expert 2GB
NeoPa's advice is spot on for use in a form not a table. If you are, in fact, trying to do this directly in a table, the answer is that you can't! And shouldn't! Data should always be entered thru a form based on your table, not directly into your table.

So are you, in fact, trying to do this in a table?

Linq ;0)>
May 4 '10 #4
OK I am making a Form sorry..not a table...

I have a list of proposed Items they are numbered and each number has a corrsponding description. I want to be able to input a number to get the discription in another box to appear...

If I input ITEM BOX the number 12 - I want the box next to it to read ..."Glazed Donuts"
May 4 '10 #5
missinglinq
3,532 Expert 2GB
Originally you were talking about EmployeeIDs and EmployeeNames, so here's some sample code for that. You can modify it for your new "donot" scenario:

If EmployeeID is defined as Text

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtEmployeeID_AfterUpdate()
  2.  Me.txtEmployeeName = DLookup("EmployeeName", "YourTableName", "[EmployeeID] = '" & Me.txtEmployeeID & "'")
  3. End Sub
  4.  
If EmployeeID is defined as a Number
Expand|Select|Wrap|Line Numbers
  1. Private Sub txtEmployeeID_AfterUpdate()
  2.  Me.txtEmployeeName = DLookup("EmployeeName", "YourTableName", "[EmployeeID] = " & Me.txtEmployeeID)
  3. End Sub
Linq ;0)>
May 4 '10 #6
thanks alot that will work
May 5 '10 #7
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
May 5 '10 #8

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

Similar topics

0
by: Morten Gulbrandsen | last post by:
Database mysql running on localhost Error The additional Features for working with linked Tables have been deactivated. To find out why click here. -> Database mysql running on localhost ...
5
by: jedbob | last post by:
I used Adobe Imageready to build a simple rollover navigation bar, where the text will change color on a mouse over. The working example can be found at:...
1
by: Sampath Reddy | last post by:
Hi Everybody, We are using UDB v8.1 I will explain about my Stored procedures which we are executing in UDB AIX box. We have 3 millions(apporox) of data in 22 tables. By applying the business...
2
by: RC | last post by:
I am updating/improving a working database for a non-profit organization. I am thinking of making a copy of the database at the office, bringing the copy to my house, making the changes and then...
3
by: S. van Beek | last post by:
Dear reader, To work with linked tables is a professional method of working with a frond end and back end mdb. Working with linked tables on a local pc gives an acceptable performance but...
1
by: S. van Beek | last post by:
Dear reader, How to increase the response in case of working with linked tables, program in frond end mdb and tables in back end mdb. For possible combinations and their response...
2
by: S. van Beek | last post by:
Dear reader, By working with a frond-end and back-end databases with the use of linked tables the performance, if both mdb's are on a local drive is reasonable. But in case the backend is...
1
by: Simon | last post by:
Dear reader, Working with linked tables gives me some troubles. Both mdb's, frond-end and back-end are in deferent folders but on a stand alone pc delivers an reasonable response time say...
2
by: scripty21 | last post by:
Hello all, I am working in Excel using VBA and am extracting data from a .mdb file. The .mdb file contains anywhere from 50-300 tables and the user needs to be able to choose which table(s)...
2
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Have a complex process where I need to Import a large amount of data then run some transformations on this data then import into DataBase. The transformation involves multiple fields and multiple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.