Topics Search

Text Box control and character limit?

Text Box control and character limit?
Views: 109
I have an unbound text box on a form. The form is bound to a query but only for reading records. The unbound text box is programatically populated with data from the form's recordset. If the text gets around 2038 characters long trying to save via the form produces the error "could not update; locked by another session on this machine." I can still update via the table, just not the form. Also, if I have the form viewing the record containing this long text then even via the table it says the record is locked and cannot be updated.

**The field in question is in its own table because it is a memo field that gets changed regularly in production. The production environment has this as a bound control but I am trying to implement unbound controls to avoid excessive record locking.**

Is there some limit on text controls regarding length of text? I cannot find anything by googling or searching this forum
Sponsored Links:

Similar posts...


Character limit in form field

Character limit in form field Icon
I have created a form in Access 2003. One of the fields titled "Description" typically will have more than one line of information entered into it. Right now, there appears to be a character limit.

It does not allow me to enter any information beyond just one line. Is there any way to extend the character limit of this field, or even better, make it unlimited?

SendObject Message Character Limit

SendObject Message Character Limit Icon
I have a button to send automatic emails confirming interview times. The action works well, but I've reached the alotted number of characters and I'd like to add more text to the message body. Any ideas on extending the text limit?

Tab Control - Pages

Tab Control - Pages Icon
I have a common text box control which appears on all 4 pages of my tab control. (Common text box control achieved through pasting a text box control onto the tab)

I only want the user to be able to change the data in this text box control if they are on Page 1. If they are on any other Page, then I would like to Lock the text box control.

If there was a Got Focus event for a Page then I could do what I need; but there isn't!

Is there a way to determine which Page of my Tab Control is active

Output only part of a field ( Text ) to a form control ?

Output only part of a field ( Text ) to a form control ? Icon
I'd like to only output part of a field value to a Combo Box ( as it is, its control source, is set to this field ) The reason is, I have prefixed a single character a,b,c,or d - to the field's value, to ensure I sort the records in the order I want.

However, I don't want or need the user, to see this 'control character.

Form Text Box Control Events

Form Text Box Control Events Icon
Using Access 2010 accdb, I have a form with an unbound Text Box Control. The Control Source is defined by the Form On Open Event. One option is for a string (function) to populate the Text Box Control and the other is for a Value to be placed in the control.

Both options result in automatic population of the control with a Currency value. I would like a Command Button control to be Enabled - True or False depending on the value. as per the code below.

Add a text box control to a form or report

Add a text box control to a form or report Icon
The text box is the standard control used for viewing and editing data on forms and reports. Many different types of data can be displayed in text boxes, and you can also use them to perform calculations. This article explains how to create and use a text box and also explains some important text box properties.
What do you want to do: Add a bound text box, Add an unbound text box, Add a calculated text box, Understand text box properties.

Count row before text in a control

Count row before text in a control Icon
I have a report with a text box and I want to be able to start with on and count for every text box for each record like:

1) Some text
2) Some text
3) Some text.

Right now I have a text box that has =1 as its control source but I need it with the text it self not in its own text box.

In the text box I want to add a number its control source is =" " & [BasicJobSteps]

Exceeding character limit of control source with multiple subreports

Exceeding character limit of control source with multiple subreports Icon
I am using Access 2007 on Windows XP. I am trying to build a report that contains up to 4 subreports. The main report should add the subtotals of the 4 subreports. Not every report will contain all subreports so I am using IIF to identify subreports with no records. In the main report I can add three IIF routines just fine.

Here is my control source expression that works:

=IIF([srptInvoiceDetail].[Report]![HasData], Nz([srptInvoiceDetail].[Report]![txtSubTaskTotal],0),0) +
IIF([srptAddFLR].[Report]![HasData], Nz([srptAddFLR].[Report]![txtFLRTotal],0),0) +
IIF([srptAddParts].[Report]![HasData], Nz([srptAddParts].[Report]![txtPartsTotal],0),0)

If I add the 4th IIF for the last subreport I exceed the 256 character limit of the expression field.

How can I work around this limitation?

I can envision two ways to accomplish this:

1. Perform the IIF in the subreport to ensure that a valid value is passed to the main report. If the subreport has records, the value would pass through correctly. If the subreport has norecords, the HasData flag will reflect that and the value will be set to zero.

2. Perform the IIF calculations in VBA in Report_Open (or some other report event). The IIF calculations would be performed in the Report_Open event and pass the total to the unbound text box in the main report.

How to limit input, if cell is empty

How to limit input, if cell is empty Icon
I have a form with text boxes, for example, Order and Job.
I need to limit Job number input in Job text box, if Order text box is empty? For example - I need, if Order box is empty, then allowed numbers in Job text box is only 500, 501, 502.
If Order text box has a record, then Job number input no limited.

Unable to get text value

Unable to get text value Icon
weird one here. When I try to get the .text value from a combo as the user is changing the value, I get a "Control must have focus" error. But it should have focus, I'm editing the @#$@# thing.

Here's the only code on any of the control events:
Private Sub cmbDefendant_Change()

Debug.Print "text: " & Me.cmbDefendant.Text

End Sub

The list of possible values can be huge so I'm wanting to wait until the users typed 4 characters in the combo before I go get a the list of values from the database. I've done the same thing on another field on the form so I don't understand why its a problem on this one. I've tried changing the limit to list property for the control but that didn't help. On the other control I have it set to Yes to limit and it works fine