Textbox link

L

Larry

I’ve been having problems with this for about two week now, can’t find any info online. I have a table for inventory with a lookup column with (Complete, In Repair, In Shipping, In Receiving, In Office) and only want those be changed in inventory. Then I have several other tables but I'm just going use Repair as example. In repair I have the products with S/N which is what records go by. I need either a label or textbox that just says if it is (Complete, In Repair, In Shipping, In Receiving, In Office) I’ve been using access for a while and have tried everything I don’t know if the relationships are wrong or what I'm doing wrong if anyone can help is lemans terms that would be awesome.
 
K

Ken Snell

Can you give an example of what the form's info will be and what actions you
want the user to take and what you want the database to do? I'm just not
following your description here.

FYI...using a "lookup" field in your table is not recommended...leads to all
types of confusion. See The ACCESS Web for more info re: this:
http://www.mvps.org/access/lookupfields.htm


--

Ken Snell
<MS ACCESS MVP>

Larry said:
I've been having problems with this for about two week now, can't find any
info online. I have a table for inventory with a lookup column with
(Complete, In Repair, In Shipping, In Receiving, In Office) and only want
those be changed in inventory. Then I have several other tables but I'm just
going use Repair as example. In repair I have the products with S/N which
is what records go by. I need either a label or textbox that just says if it
is (Complete, In Repair, In Shipping, In Receiving, In Office) I've been
using access for a while and have tried everything I don't know if the
relationships are wrong or what I'm doing wrong if anyone can help is lemans
terms that would be awesome.
 
L

Larry

Ok I have an Inventory Table and what I did now was put a Table for "Status" within status table is

ID - Status
1 - Complete
2 - In Progress
3 - In Repair
Etc.

Well I have products that go in and out of repair, inventory office, and shipping and reciving. Well in the inventory Form I have where you can change this product's status location, also have it with a drop box. Now in the Repair, Receiving, Shipping etc "Forms" when they look at the product record all i want them to see is the text box or label that has with in it the correct status that is in the inventory colomn. So if they are looking at "Product - 114" with status "In Repair" I want the "In Repair" with in a text box or label on the "Repair Form" so they can't change it. All i want these other forms to do is just show the current status of a "Record/Product" and when i change it in inventory it will show next time someone looks at it in any other form. I dont know how to really explain it any further but if this doesnt help I can try.
 
K

Ken Snell

Can you use a combo box to select the "product" on the form? If yes, then
use the technique shown on The ACCESS Web for how to populate a textbox
based on what is selected in a combo box:

http://www.mvps.org/access/forms/frm0058.htm

If you use the method where the control source is set to the expression, the
textbox will be locked to any changes. Otherwise, you can lock the textbox
in the form's design view so that it'll always be locked to the user.

--

Ken Snell
<MS ACCESS MVP>


Larry said:
Ok I have an Inventory Table and what I did now was put a Table for
"Status" within status table is
ID - Status
1 - Complete
2 - In Progress
3 - In Repair
Etc.

Well I have products that go in and out of repair, inventory office, and
shipping and reciving. Well in the inventory Form I have where you can
change this product's status location, also have it with a drop box. Now in
the Repair, Receiving, Shipping etc "Forms" when they look at the product
record all i want them to see is the text box or label that has with in it
the correct status that is in the inventory colomn. So if they are looking
at "Product - 114" with status "In Repair" I want the "In Repair" with in a
text box or label on the "Repair Form" so they can't change it. All i want
these other forms to do is just show the current status of a
"Record/Product" and when i change it in inventory it will show next time
someone looks at it in any other form. I dont know how to really explain it
any further but if this doesnt help I can try.
 
K

Ken Snell

Use an expression similar to this as its ControlSource:

=Forms!FirstFormName!ComboBoxName.Value


--

Ken Snell
<MS ACCESS MVP>

Larry said:
OK i got the combo box and text box to work in the form thank you very
much. But now how do i setup a text box in another form to show what that
combo box value is.
 
K

Ken Snell

If you don't want Form 1 to have to be open when you want to see data in
Form 2, then you'll need to have Form 2 get the desired data via a query
from the tables' data.

It sounds as if Form2 is a continuous forms view for the form. In that case,
an unbound textbox, which is what you're using (even though you've set the
Control Source to be equal to the combo box's info), will show the same
value in all records, and won't be changed for each record. Only way to do
that is to bind the textbox to a field in Form 2's record source. This
further supports changing Form 2 to what I've said above -- don't base Form
2 on values in Form 1, but rather have it get its data from its own query.

If you need Form 2 to "reflect" in some way what is in Form 1 (not sure why,
as you said that you don't always want Form 1 open when trying to view data
in Form 2), then Form 2 will need the ability to filter its data based on
some choice in Form 1, or some other method of limiting what Form 2 shows. I
can't give more specific recommendation re: this right now, as I don't fully
understand the entire Form 1 and Form 2 setup and linking.

--

Ken Snell
<MS ACCESS MVP>

Larry said:
Ok now that ive been messing with it now ive run into another problem. I
have a Record ID in my tables and i have a S/N and a status column i need
this text box to show the status of each S/N in form2 so when i view form2
it will show me the current status of that S/N. At the momment when i open
form1 it will say complete in status combo. Then when i open form2 it will
say complete in every status box and they all are not complete. Also form1
has to be open for the form2 box to work right or it says (#name?) Is there
a way for this text box to use the table column data by ID or S/N so it will
show the correct status each time i change the record in the form.
 
Top