field defult value

  • Thread starter Thread starter bahram
  • Start date Start date
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.
 
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
 
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).
 
-----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"
 
Back
Top