Hi all- I'm currently using a form to look up records based on a few fields. Problem is, it's overwriting the first record in the table! Is there a way to avoid this, or should I write code to restore the original value every time a search occurs? (It's not every time a search occurs, but whenever the record is no longer being edited, whether in form view or when it's clicked away from in the table itself.)
Stop a form from updating a table
Collapse
X
-
Tags: None
-
I'm afraid that's only happening because you've designed your form wrong.
Have a look at Example Filtering on a Form and Cascaded Form Filtering for help doing it as you'd want it to work. There should never be any situations where the existing data gets updated as part of the search/filter process. -
Sorry, don't know if I was unclear or if I'm just not understanding the given links... I have a form that consists of 5 dropdown menus. The top one uses an SQL query to get all of the distinct values in the manufacturer field of a table. The second gets all distinct values in the supplier field that also have the selected manufacturer. The next gets all the part numbers with those manufacturer and supplier values. There isn't any code on these comboboxes except to requery when something changes.
Also, how does one make unbound comboboxes...? Very sorry...Comment
-
My suspicion, and only that at this point, is that you're using bound controls and that's what's causing your problem. A bound control is any one that has a value in the .ControlSource property that specifies a field from the form's recordset (That which the form is bound to via its .RecordSource property).
Originally posted by RadioWriterRadioWriter:
Also, how does one make unbound comboboxes...?
Originally posted by RadioWriterRadioWriter:
Very sorry...Comment
Comment