neuroman9999
Member
- Local time
- Today, 17:57
- Joined
- Aug 17, 2020
- Messages
- 824
I've recently been frustrated to no end with these methods of saving form data:
can anyone tell me what each one is supposed to do and what the rules are, in terms of under what circumstances they DON'T work? here's what I have noticed:
=> when assigning a value to a ctl binding using code from an external proc, the form dirty event is not triggered (e.g. - forms("form1").controls("textbox") = "value")
=> runcommand(accmdsaverecord) does absolutely nothing and doesn't recognize form values present if the above method is used
=> same rule from previous line applies too, if also using docmd.save acform, form_reference_here
=> if you issue runcommand(accmdsaverecord) for a specific form for the purpose of saving a record when it is brand new and the values are put in the binding from code, you can't run subsequent action queries on that record because the record technically has not been recognized as transacted. thus, access doesn't see any data in it. query errors out.
given all of that, how do you guys do it the right way? both under the scenario when a buy has messed it up themselves, or they actually do want to redo it from scratch so it's built the right way? there are many ways, obviously, but in the "fix it" game, a lot of times people don't want to pay to get it done correctly from scratch. happens all the time.
thanks.
Code:
- docmd.runcommand(accmdsaverecord)
- DoCmd.Save acForm, Me.Name
=> when assigning a value to a ctl binding using code from an external proc, the form dirty event is not triggered (e.g. - forms("form1").controls("textbox") = "value")
=> runcommand(accmdsaverecord) does absolutely nothing and doesn't recognize form values present if the above method is used
=> same rule from previous line applies too, if also using docmd.save acform, form_reference_here
=> if you issue runcommand(accmdsaverecord) for a specific form for the purpose of saving a record when it is brand new and the values are put in the binding from code, you can't run subsequent action queries on that record because the record technically has not been recognized as transacted. thus, access doesn't see any data in it. query errors out.
given all of that, how do you guys do it the right way? both under the scenario when a buy has messed it up themselves, or they actually do want to redo it from scratch so it's built the right way? there are many ways, obviously, but in the "fix it" game, a lot of times people don't want to pay to get it done correctly from scratch. happens all the time.
thanks.