field defult value

B

bahram

Hi
I have table with 2 fields, ITEM and IMAGE.I want defult
value of IMAGE be based on value of ITEM. For example if
ITEM value is "BAG-1041" then IMAGE defult value be "BAG-
1041.jpg" My table name is BAG2.
I tried =bag2.item.value+".jpg" but I got the
message that field BAG2.item.value could no be found.
what code should I put on defult value.
I thank you in advand.
 
K

K. Allen

My suggestion is to do this in a query. I used this as an
expression in the query: [field1] & ".jpg" (field1 is
the name of the field containing the first part of the
name).

Ken Allen
 
C

Chris

You can't do this via a table default value, but you can do it in forms
(which is where you want to enter the data anyway).
 
M

Marty Suckstorff

-----Original Message-----
Hi
I have table with 2 fields, ITEM and IMAGE.I want defult
value of IMAGE be based on value of ITEM. For example if
ITEM value is "BAG-1041" then IMAGE defult value be "BAG-
1041.jpg" My table name is BAG2.
I tried =bag2.item.value+".jpg" but I got the
message that field BAG2.item.value could no be found.
what code should I put on defult value.
I thank you in advand.

.
Just write some vba code and include it in the "After
Exit" event for the item text box like this:
[IMAGE] = [ITEM] & ".jpg"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top