Field Update With VBA code

sandya

Registered User.
Local time
Today, 16:10
Joined
Oct 27, 2013
Messages
82
Items form:
ID - Brand --- Model --- Color --- Items Description
1 -- Samsung -1234 --- white ----Samsung 1234 white
2 -- Nokia -----225 ----black ----Nokia 225 black

Above Brand, Model, Color field's data is merged in Item Description field without entry & using with build formula =[Brand] & " " & [Model] & " " & [Color] so its working perfectly. But I need vba code for update the Item Description from Brand, Model and Color field's entry.

Can anyone help me how to give a vba code for this issue.

Thanks
Sandhya.
 
what condition(s) will trigger the update?
 
You wont be able to update the description field "automatically". For that, you would have to declare the field as calculated field and provide the formula (as you mentioned).

To handle this through VB code, you need to have a triggering event and upon that, you can use this code:

Code:
Me.Description.Value = Me.Brand.Value & " " & Me.Model.Value & " " & Me.Color.Value
 
Yes its working perfectly below code thank you so much dear :)

Code:
Me.Description.Value = Me.Brand.Value & " " & Me.Model.Value & " " & Me.Color.Value
 

Users who are viewing this thread

Back
Top Bottom