code information in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have a form with a code text box on it, I want that when someone put a
code in the texbox, in another texbox appears the description of the code,
something like this:

the user tipe in one text box: In the other text box appears
automatically:
2 --> 3X5
Polypropilen Bag
60 --> 15X25
Polypropilen Bag
It's important to say that I have 1250 different codes and I have allready
typed all the codes with his description; The form is related to a query and
code is one column of one table where are asked the code, amount of pieces
and date of sale, but description is other column in other table (that cant
be edited).

PD, without using subforms .
tks
 
Filo,

Include the "other table' in the query that your form is based on,
joined to the main table on the Code field, and put the description
field into the query. Then you can represent this field on the form
with a textbox, and then set the Enabled property of the textbox to No
and the Locked property to Yes so it can't be editied. Then, when the
Code is entered on the form, the Description should automatically be
displayed.
 
Build a combo box that returns the codes as the 1st column, and the
description as the 2nd column

Then, simply for ht data source of the 2nd text box on your form, go:

=([combo18].[column](1))


The beauty of this system is that you don't have to copy, or even store the
descritpon text..and this is why relatonal databases are so cool!!
 
ohhh albert, you always solve my problems, thanks.

also thanks to steve, but I have alrready tried what you typed and It
didn't work
 
Ah, but I have a small detail, I want to use my form in datasheet view, when
I type the code (or select the code from the combo box) all the other code
records are changed¡¡¡
 
Filo,

I am not sure what "didn't work" means, but what I suggested is standard
procedure, and normally there is not problem with it.
 
steve: I could send you my file if you want????

Steve Schapel said:
Filo,

Include the "other table' in the query that your form is based on,
joined to the main table on the Code field, and put the description
field into the query. Then you can represent this field on the form
with a textbox, and then set the Enabled property of the textbox to No
and the Locked property to Yes so it can't be editied. Then, when the
Code is entered on the form, the Description should automatically be
displayed.
 
Ok, why not. Zip it up and email to me, and indicate which form and
tables we are talking about. Remove the .ns from the return email address.
 
Back
Top