Access 2007 not auto-updating calculation with bound fields - ms-access

I developed an Access 2003 database with a form that has a number of bound input text fields. As the user update the value in these fields, the table is updated with the changed value. I also have an unbound textfield that displays a calculated value from the user input. This does not use the values from the textfields on the form, but directly from the table.
The Control Source of this textfield is something like:
=[field1]+[field2]+[field3]
Rather than
=txtInput1.value+txtInput2.value+txtInput3.value
In Access 2003, the calculated textfield get updated automatically as a user changes the bound input fields. However some of the users are using Access 2007 and they don't get the calculated field updated automatically, unless they reload the form.
It only updates automatically if I use the input textfields rather than the bound fields to perform the calculation.
I have selected "Allow this content" in the security warning. Is there anything else I can do to make it behave like in Access 2003?
Thanks

Related

How do I get my Access form to re-open to the last unbound text box entries?

I have created a form to update criteria in various queries in my database. I have 4 unbound text boxes. The user enters the new dates into the text boxes and I've added a button to run the queries. The query results look great.
The problem is, I want to be able to close the form and upon re-open have the dates that were last entered re-appear. Instead, the text boxes are blank and the user has to re-enter the dates.
Basically, the same dates will be used for a month, then at month end, the dates will change. I would like to be able to set the default to the last entry.
Is this possible?
Rather than using unbound textboxes, consider creating a table containing a single record to store the values entered in each textbox, and then use the table fields as the Control Source for each textbox.
This way, when the user enters/changes the value in the textbox, the underlying table record is automatically modified and will be automatically reloaded when the form is reopened.
You can also set the Allow Additions & Allow Deletions properties both to No in the Form Data properties, so that the user cannot create/delete the record in the underlying table being used to save the textbox values. Make sure that Allow Edits is set to Yes to ensure that the user can change the values in the textboxes, and that the Recordset Type is Dynaset so that it can be edited.
Using this method should also not require any changes to the rest of your existing application, since the values held by the bound textboxes may be read in the same way as if they were unbound.
It's hard to know exactly what you're asking without seeing the code you have, but if you are using VBA, you could look into the difference between hiding the form and closing/unloading the form as described in this answer. If you hide the form, it won't be visible to the user, but it will still be loaded, so your text boxes should keep their values. When the user needs to interact with the form again, you can un-hide it.

Ms Access Datasheet view - only one column editable

There is access datasheet sub-form and users should only be able to edit count column. How can that be done ?
Currently, If I change the form property Allow Edits = True, users can update any cell.
Also, the user should be able to enter different count values. If a user types 1 in first cell, it get copied for all the rows.
How can this be achieved?
For each control on the form that you don't want editable, set the Enabled property to False (or the Locked property).
For the count copying to all rows, we need to see the query that this datasheet is based on to answer that. If the count is an unbound textbox, you will get the behavior you are seeing as Access will only create a single instance of the control, then repaint that single instance across all rows (note that this is the same with continuous forms as well)
Instead, create a query that has this field (or a dummy table) and bind to that, making sure to bind the textbox to the dummy field, and then you should be able to edit the value on a per-row basis.

Generate Report in MS Access with Dynamic Layout

I have a task to create ad-hoc report generator engine in MS Access where user can select table, fields and criteria, and report will be dynamically generated based on the given parameters.
I create Access form as the interface for user to input the required parameters (using ComboBox and ListBox to select table and field(s)). All tables are stored in Access database. I have successfuly bind list of tables and fields to the ComboBox and ListBox.
My questions is..
How do I generate dynamic report layout based on number of fields selected in the form? Let say if the user choose more fields, the field width will be smaller than if he choose less number of fields (I want the report fit Form/Report View).
FYI, I am working MS Access 2010.
There is a property called Can Grow just select the field you want to grow and change it to yes. Keep in mind however that the CanGrow property does not apply to a form or report page header and page footer sections.

textbox in continuous form populated from different table

I have a continuous form in an access 2010 database that outputs a separate row of data for each customer from a customers_table. The continuous form is for data display only, and no data entry or editing is allowed. One of the textboxes on the continuous form is populated with data that was entered using a combobox in a different form used for data entry. In the textbox on the continuous form, enabled is set to no, and locked is set to yes, so that the textbox is not editable in the continuous form. However, in the separate data entry form, the combobox entered the id for the selection the user chose, instead of entering the text. Therefore, in the continuous form, only an id number is shown, when the user needs to see the text of the specific option which is encoded in that id number.
I think I want to keep the id in the customers data table, in order to retain freedom to make subtle changes in the combobox options later.
So how do I modify the textbox in the continuous form to populate with the textual value associated with the id number? This would seem to involve some sort of SQL like:
"Select textValue FROM comboboxsource_table WHERE comboboxsource_table.ID=textbox.Text"
However, I have no idea where to put this in the Access GUI. The Control Source field in the Data tab of the property sheet for the textbox does not seem to allow this sort of syntax.
If you're not editing the data, put a query behind the form instead of a table. Then, just pull the field you need into the query and VOILA! Problem solved. :o)

Using VBA for a MS Access 2000 Textbox's Control Source

I'm in the process of converting a MS Access 2000 database to MySQL, while still using Access for the front end.
I've come across a problem where some forms get the data from fields in MS Access tables. IE, the "Control Source" value is set to a specific field, and when the form is run, its creates the required number of Textboxes to match the number of entries in the table and populates them with the data from the tables.
Now I'd like to be able to set the Control Source of the Textbox to call a VBA function, which get's the data from MySQL, and populates the textbox with the entries in MySQL table. I'm not sure how this is achieved, or if its even possible.
So could I just create a VBA function and set it in the Control Source property for the Textbox, or do I need a more complicated solution ?
You do not need any code for the text boxes to display. Simply use a linked table to MySql, and the form should function as before. There is little if any reason I can think of here to dump the use of bound forms and bound controls.