MS Access - Continuous form custom text entry - sql

Good Morning All,
I am wrestling with a problem with continuous forms.
I have a continuous form based on a query that pulls transaction information from a table.
I want to have text box on each row where the user can override the fee value, at which point when the submit button is clicked the overridden information is written into a second table in the database.
When I add an unbound text box onto the continuous form I end up with all entries reflecting the amount I have just entered.
If I add a dummy column onto the SQL query, I am unable to edit the information.
Is there a way to do this? Below is an example of the form input I am shooting for:
Snip:

I don't think this can be done in Access.
I think the closest you can get, is to display the value from the secondary table in your continuous form; and then, after some user input (focus into the textbox, or double-click the text box, or button click), prompt the user to enter a value using either the VBA InputBox function, or leveraging the built-in Zoom box. Check that the user-entered value is a valid number, update your external table, and refresh the query results.
You might also create a custom form to validate the input.

Related

I have created a form in Access that corresponds to a table with zero attributes

I have created a form in MS Access. The corresponding tables for these forms have zero attributes. I simply created a blank form and manually inserted text boxes, labels, check boxes, etc. Now I would like to capture specific information that is entered into the form. How would I go about this in MS Access? Do I need to write some VB code to say "record whatever value the user puts in the field for serial number" for example? There is no preexisting data in any tables.
A user will manually fill out the form in Access, I would like to capture the data that the user inputs.
Bind the table to the form and then bind the controls to the fields of the table.
Or, the easy route: Mark the table in the navigation pane, then click in the band: Create and then Form, and it will do the dirty work.

Clear auto number field on a Form using clear button

I'm new to MS ACCESS, I would like to know if there is a way to clear an auto number field using a clear button. I've tried to follow some videos on you particularly this one but it seems to be not the proper way on how to deal or create an auto number field.
This is the image is the sample of the form which I'm experimenting with this particular subject.
And this image is the error code which I'm getting right after I clicked the clear button.
[![enter image description here][3]][3]
Below is the code I use for this experiment.
You don't need to clear autonumber field, it handled automatically. So, remove EnployeeID field from INSERT statement and delete rows with Me.txtEmployeeID from clear procedure
The AutoNumber Data Type is assigned automatically and can't be
changed. Also once you enter data into some other field like Employee
Name(New Record event initiated), access will assign a value to the
AutoNumber let's say 1. If you press Esc, access will cancel the edit. Next time you create a new record access will assign the value 2 and so forth. Unless you repair the database then access will reset the AutoNumber counter.
If you want a data type that you change its value, you need to change the Data Type to Number. In this case you need to assign each value by code or by the user input.

MS Access 2016 VBA - modify TextBox via VBA in Tabular Form

the problem I have seems to be related with the tabular form which allows showing multiple entries at the same time.
I want to have one column (A) calculated from another column (B) but (A) shall still be editable. If I use ControlSource for (A) the underlying textbox becomes non-editable. The same applies for the usage of queries. Both options are not good. Therefore I want to use VBA code that modifies the content of (A) based on changes in (B). And vice versa, if the user modifies (A), (B) gets updated. Btw. (A) does not get stored in the database, only (B).
Problem is, if I update the value of (A) via VBA during an event of (B), the whole column (A) shows the same value and is not calculated line by line in the tabular form mode. Any assistance / help appreciated. Thanks!
An unbound textbox will show the same value for all records. Period.
2-way data dependency is unusual. Think I have seen something like it only once. Involved calculating square footage. User entered rectangular dimensions then had choice of entering the actual footage to account for irregular boundaries or cutouts and the adjustment was calculated or entering the adjustment and the actual was calculated. User had to select a radio button to designate the editable control. This was not on a continuous records form, just single record.

Access 2007 need to Force a query update based on a field change in a form?

I have an access database with several calculated fields in text boxes on a form. Most of those update immediately after the data included in the calculation is updated. However I have a couple of those calculated field text boxes that include a data point from a Query, when I update a filed that would impact the query results, those calculated fields do not update correctly until I click through a few records or close and open the form.
How can I force that specific query to update after updating a specific filed on the form?
Try refreshing the form.
Me.Refresh
As an aside, you really should get out of the habit of using bound forms, because you have to end up kludging a bunch of stuff (like this) to get it to work properly, and the Undo functionality (cancelling the entry of a new record) is unstable at best. By unbinding a form, you can have more control over how it reacts to calculated fields and dumping a new data entry is a snap.

Trying to open another form in Access based on a field in the current form

I have a form that's just a list of descriptions (desc.) of other forms. Right now, when you click on a desc., the appropriate form opens; but it's done through a series of if statements in a macro. This isn't going to scale well once more forms are created.
I have a table that has the desc. and the form that is supposed to go to. I want to write a script that uses this table to open the new form based on the desc. clicked, but not using if statements. The end goal is to be able to just add a row to the table for any future forms that are created without making changes to the script or form. Is there a way to do this?
Use a combo box whose row source is a query which selects the form description and name fields from your table.
The combo will have 2 columns. You can set the width of the form name column to zero if you want to present only the form descriptions. If you make the form name column the combo's bound column, you can reference it conveniently in a DoCmd.OpenForm statement. For example, you could have a command button whose click event opens the form which is currently selected in the combo ...
DoCmd.OpenForm Me.YourComboName.Value