Automatic Values

Hue

Registered User.
Local time
Today, 00:38
Joined
Jan 23, 2004
Messages
14
Need help from a student - pls dnt be harsh. :-)

Hi there, i registered here thinking that this DB will help me on my simple prob....

Here goes:

Field list
Table 1 Table 2

xCode yCode
xDescription yDescription
yDate
yNumber


Now let’s say I will make a form for Table 2. Now here is the problem. once i enter yCode it will automatically get the equivalent description from Table 1. (xDescription), otherwise the user will be prompted that a code does not exist.

How is this? Hope you can help me on this simple problem. Im new to MS Access.


Hubert
 
Are you storing the same kinds of data in the two tables? cause if you are you should make just one table and store the data in there and add another field called "type" or something, where you state whether its x or y.
 
no. i just attached x & y to distinguish fields from each table.

let's say i have a table for all the codes of my items (table1) in my inventory. then i want to sell them to a particular customer through an invoice (table 2). now, upon entering the product code... i want to see automatically the other details of that code... description...size... etc..

hope this explanation helps. :)
 
Sorry, couldn't resist with the original title of this thread: "Need help from a student - pls dnt be harsh. :-)" - the last person I'd ask for help is a student. :p
 
Now, don't bind tables to forms.

Use a query to relate the two tables based on related keys and select the results you want with that.
 
Hue said:
let's say i have a table for all the codes of my items (table1) in my inventory. then i want to sell them to a particular customer through an invoice (table 2). now, upon entering the product code... i want to see automatically the other details of that code... description...size... etc..
If you're saying you want fields to be automatically populated after selecting a product code, you can use a ComboBox to do this.

Col
 
ColinEssex said:
If you're saying you want fields to be automatically populated after selecting a product code, you can use a ComboBox to do this.

Ah ha! I hate it when I can't figure out what people are wanting. Not my problem though. :D

AS Colin says, if all the necessary data is selected into the combobox then you can hide all the columns by setting the ColumnWidth property.

As the combobox values are selected the other textboxes will be updated once you put in their ControlSource the equivalent to: =[MyCombo].[Column].(2)

The number refers to whichever column you are referring to. Column 0 is the first.
 
Mile-O-Phile said:
Ah ha! I hate it when I can't figure out what people are wanting.
Me too - I read your reply and thought I might delete mine because I was on the wrong track. :confused:
 

Users who are viewing this thread

Back
Top Bottom