Hello everyone I am new to access and have been trying to teach myself a bit lately. In any case, I have a problem with a specific text box(NumofMonths) within a form. I need for the default value to be 12 and that it may be edited. This text box is nested along with like 10 others which all interact and calculate depending on the textbox(NumofMonths). I can't edit it due to the expression. Gives me the error "Could not be edited: bound to the expression..."

When I right click properties to check the control source i see: "=Forms![Rex Leasing Account History]![Number of Months]"

I don't understand this expression. Can someone explain the syntax more or less. I can't find anything named "Number of Months" on this form. Can it be pulling the info from another table? I have a table named "Rex Leasing Account" which has this criteria.

Any help would be great. Thanks!!

Dani AI

Generated

Nice follow-up by — a short, practical breakdown for anyone who finds a textbox that looks calculated and refuses to be edited.

Controls whose ControlSource is a calculated expression are read‑only. To make the field editable while still providing a default of 12, make the textbox an ordinary (unbound) input and give it a default value. In Design view clear the Control Source so the box is not driven by an expression, then set the Default Value property to 12 (in the property sheet). DefaultValue affects new records only; to set the current record programmatically use the control's Value.

Example VBA notes (place in the form module):

Private Sub Form_Load()
    Me.txtMonths.DefaultValue = "12"    ' default for new records (string required)
    Me.txtMonths.Locked = False
    Me.txtMonths.Enabled = True
End Sub

Private Sub txtMonths_AfterUpdate()
    Me.Recalc                            ' update dependent calculations
End Sub

If the value must be saved back to the table, bind the control to an actual table field or write the value to a field in code. If other controls are calculating from this input, reference the unbound textbox in their expressions (so only the dependents are expressions, not the input itself). Also check that the control's Name property (not its label text) matches what other expressions reference; locked or disabled properties will also prevent editing.

Troubleshooting checklist: open the form in Design view and inspect Control Source and Name; search VBA modules/macros for references to that control name; ensure the control is not part of a calculated field in the form's RecordSource (those are inherently read‑only).

Nvm did some research on expressions and got it to work! Thanks everyone. Marked as Solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.