@jwill,
I don't understand how having normalized tables and using unbound forms goes together.. Of course I haven't seen the table structure....In order to keep the tables normalized, I made the form unbound and
And there is nothing wrong with using unbound forms/controls.... except for a LOT more work involved..
I once helped a wine importer modify some forms - A2000 format mdb. They wanted to do group adds, edits and deletes (3 new unbound forms). It had 20 rows and 36 columns of text boxes (720 unbound text boxes), plus a handful of other controls. *Lots* of code, but it worked for them.
Rather than use the control name and parse to get the code, you could use the TAG property. For lack of a better example, look at the text box "auditor_ID_txt". Not a bad naming convention. But instead of having to parse the name, put the data/name/code ("auditor_ID") in the TAG property.It seemed like it was easy to parse the control name for the code and put it in the table
Then you can use
var_act_control = ctl.Tag
instead of
var_act_control = Left((ctl.Name), Len(ctl.Name) - 4)
to get the code ID. Much simpler...
This is back to issue I asked about earlier.I'm curious as to why only the first line gets updated when it finds a match and leaves the other rows unchanged.
So you do the .FindFirst with the criteria. No record found, so add a record. OK, no problem.
On the other hand, using the same criteria, one or more records are found. You edit the first record. But you don't know how many records match the criteria. You would have to have code to loop until there were no more records that matched the criteria. IF you wanted to edit all of the records that matched the criteria. (the alternative would be an update query)
Just thinking out loud.....![]()