There is no sub form. Expand Select Wrap Line Numbers. Follow Post Reply. Rabbit 12, Expert Mod 8TB. Please use code tags. You need to delimit your UnitMeasurement as a string. Without quotes, it will think it's a variable. RunSQL requires a string. To delimit something as a string, you surround it with either double quotes or single quotes.
Post Reply. Creating a record in a child table using ADO. By using a transaction the db engine may still be working on committing the transaction even though RunSQL is considered "Done" and your code proceeds to the next statement. This may result in program logic issues if later statements rely on the transaction being finished. The CurrentDb. Execute best advantage is the ability to trap and handle errors in the SQL processing, something that you can't do with DoCmd. To enable this, use the dbFailOnError option when executing the statement:.
You don't get warnings as you would with DoCmd. RunSQL - which may or may not be an advantage depending on your use. Set warnings temporarily to false If you DoCmd. Typically you would want to use the docmd. Examples are Update, Delete, Insert Into, etc.
Use Transaction — Optional Variant. Use True -1 to include this query in a transaction. If you leave this argument blank, the default True is assumed. See our tutorial on Access Transaction Processing.
0コメント