How do I update a field (mySQL) from my HTML table... - mysql

I have an HTML table showing my mySQL database.
I frequently need to change the content in the "current" field, which is the last column, adding and subtracting. The current number for any is "0". I would like to click on a cell and update the number by either adding or subtracting from the current number in the field.
I would prefer to click on the cell and be prompted with a popup dialogue to add or subtract to that particular cell (field).
Here is my link: http://www.logicpkg.com/login.htm
Login: admin
Password: demo
I need help and I've come so far.
Thank you.
Erik

Try using jQuery UI for the dialog box and jQuery's ajax functions to update the cell.

You might be able to put an onclick javascript event on the cell and pop up a dialogue box. Based on user input, set a hidden field with that value and do a submit(). Update your database and redisplay the page.

Related

Set unbound combo box to match on full string for not in list event

I have an unbound combo box that gets it's row source values using a select query in VBA. The values shown are filtered by other selections on the form. If a value entered is not on the list I have a prompt to ask the user if they would like to add a new record. So far this has worked without any problems.
I overlooked one issue. If the "new" item is a partial match the selection defaults to the partial match entry. (Ex. I want to add part 4321437 but part 4321437-01 is already present.) How can I get the field to match using the full field?
I have tried playing with auto expand, allow value list edits, show only row source values, and inherit value list. Nothing seems to stop it from auto-filling. I have also tried clicking out of the field versus tabbing out.
If I remove my for key-down event that displays the list options with the arrow keys, it works. However, the customer would like to keep that feature.
Is there a way to have both?
Thinking outside the box, perhaps consider using a TextBox in place of a ComboBox.
This way, using the AfterUpdate event, you would have full control over how the entered value is handled: test for a match in your dataset using a simple query and branch accordingly.
You could even cycle through existing options by successively populating the TextBox with existing values from your dataset on the KeyDown event triggered by the arrow keys.
I found a way to have both. In my Key Down Event, I check if the down arrow is pressed. If it is, I display the drop down menu.
If KeyCode = vbKeyDown Then
Me![cboNewPart].Dropdown
End If

How to handle Access DataSheetView selection change event..?

I have a Form with Default View Split Form enabled, so it will appear like picture below every time it loaded.
I also enable the page header to appear at the top which has a label to store some value (It will store Diff Amount value). What I want to do is, everytime user click on the datasheet view (and make record selection change or cell change) below the form header, I want to update the value of my label on the form header.
It's easy to change the value, but how to handle the datasheet view record selection, or datasheet view cell selection change.
In Excel, this is very easy to do, we can handled it from Worksheet.SelectionChange event, but how to do this in Access...?
Thanks in advance.
Simply use the form OnCurrent event, which fires whenever a new record becomes Current

Highlight fields in form that have been modified

I was wondering if someone can give me a general guideline or example for the following. I have created a form with several input box fields. When a user inputs something, the field highlights it orange. When a user goes to another field, the highlight goes away and the new box gets highlighted. When the user hits "save" button, the form gets saved. When the user hits "modify" button, it allows them to change the values in the fields. However, this time I would like to have the highlighted box stay highlighted on all the fields that have been changed (and obviously the fields that are not touched remain not highlighted). Is there anyway someone can send me a tutorial or create a quick example to demonstrate this? I am using Angular 1.5 and used Bootstrap to create a simple form.
Thank you
You Can use $touched property to know whether user clicked on that particular form field.
Ex:
custFrom.inputName.$touched
To know actual value modification use $dirty in the same way
Ex:
custFrom.inputName.$dirty
Please find working plunker

MS Access combobox in a continuous form changes value for all rows when I change value for one row

I've been trying to solve this issue for the past 2 hours but in vain...
So I hope that you can help me with a solution to this problem..
I have a continuous form that shows many rows at a time, I added a combobox to the form that shows some values to choose from another table, while having the default value shown from the same table. Problem is, as soon as I change the value in one of the comboboxes in the form, all the other comboboxes changes value to the same one as the latter...
How do I prevent that??
Thanks a million in advance
Tony's right. You can't do what you want with an unbound control.
However, it's not entirely clear what your intent is based on your question. If changing the combobox should update a field on the current record, then you just need to make it a bound control. You would do this by setting the combobox's ControlSource property equal to the appropriate field in the underlying table or query.
I faced similar issue and got it sorted recently. I had created a tabular form and had introduced a combo box in the form, picking up values from a value list. Whenever I used to select a value of this combo box list, the selection used to get reflecting on all the records. To correct this, you should do the following:-
1) Introduce the combo box field in the source table of your form. Instead of clicking on the drop down box in the tool box, click on the Add existing fields link on the ribbon and select the newly added combo box field from the table. This will add a combo box field and a corresponding label in the form area. For a tabular form, you may want to delete the corresponding label and introduce a non-linked label in the form header.
This solved the issue for me. Hope it will be of some value to you.
May be a couple of years late and am pretty sure that it's been long since you figured out this problem,but it's good to leave it in the thread for someone,who may be in need.
Can't be done. This is one of the limitations of Access continuous forms and unbound controls.
Because of this strange behavior I just hide that field.
In the datasheet view:
Right-Click the field header that matches your combobox
Select "Hide Fields"
Now the person can see the records and they can use the form. They don't need a field for the combobox.

How to open a form in Access, automatically select a value in a combobox and display the detail?

A user can select a value in a combo box and the detail automatically loads into the forms fields. How can I automatically select a particular value when (or after) opening the form and get the detail to load?
I've managed to set the value of the ComboBox after opening the form, but the detail on the page doesn't change until I manually select a value in the ComboBox.
Is the subform built with code or more simply by setting the link master field to the combo and the link child field to the matched field for the bound column? For the most part, the second way is best as it does not require the After Update code for the combo to be triggered, which won't happen when the value is set via code.