0

I'm working in python coding to automate the new queries base on exiting table in .mdb files. I would like to ask about how to run a loop to check whether the "Required" co to yes or no (In the current checking table). I will use the setting for next step to generate the SQL command in python.

Remark: In Microsoft website use command "CREATE INDEX index_name ON table (field) WITH DISALLOW NULL" to create this kind of column https://support.microsoft.com/en-us/office/require-a-value-in-a-field-d6bf6ff6-d653-48ef-b484-54a33c36f6c6

In MSAccess is use the setting "required"

Mad_S_Eyes
  • 13
  • 3
  • You want to change the Required property of existing field? I tested this SQL and it creates an index on specified field but the Required property is unchanged. – June7 Jan 03 '22 at 03:36
  • Does this answer your question? [how do i loop through fields of an object?](https://stackoverflow.com/questions/10353804/how-do-i-loop-through-fields-of-an-object) – June7 Jan 03 '22 at 03:40
  • In VBA / MS-Access the `TableDef.Fields` property contains all the columns of the table. The `Dao.Field` has a `Required` Property. You now just have to call these functions via COM or some Libary. – Charles Jan 03 '22 at 03:46
  • What does this have to do with tkinter? You've shown no code with tkinter functions, and the actual question doesn't mention tkinter. – Bryan Oakley Jan 03 '22 at 05:36

0 Answers0