RE: Edit Calculated Text Field

Tech-Archive recommends: Fix windows errors by optimizing your registry




Thanks Dave,

however when I enter the text below (editing for my specific fields of
course) and try to run the code I get an Open Macro dialogue box opening, and
I am not sure why it does this. Are you able to help? I'm sorry but I am
quite new to VBA.



"Klatuu" wrote:

You cannot edit a value in a control that has an expression or formula in the
control source.

I would suggest using the After Update event of the Option Group control to
populate the fields based on the Option Group selection.

If Me.FRAME51 = 1 Then
Me.txtDeliveryAddress = Me.txtCustomerAddress
Me.txtDeliverAddress.Enabled = False
Me.txtDeliverAddress.Locked = True
Else
Me.txtDeliverAddress.Enabled = True
Me.txtDeliverAddress.Locked = False
End If
--
Dave Hargis, Microsoft Access MVP


"Dan" wrote:

Hello,

I have a form which includes both customer and delivery address information.
I am wanting the delivery address to prepopulate with the customer's address
except when a valu in an option group is selected.

Currently I have a calculated text field which reads:
=IIf([FRAME51]=1,[Customer_FName],Null)

However, I am wanting to add that if [FRAME51]=2 then the text field may be
able to be typed in manually. Currently the formula I have does not enable
me to do this as the value is set to null.

Please would you let me know if there is another (simple) way to do this? I
am not yet very proficient in VBA so would like to avoid this if possible.

Thanks very much !!

.


Quantcast