Select to view content in your preferred language

How to create a form

6871
11
08-15-2012 06:06 AM
HectorChapa
Frequent Contributor
I have an access database that we have forms that we input data that we use to address customers.
One of the question is can ArcMap have an ability to create a form maybe attach to a point layer.
Any suggestions would this be done through python.
Any help much appreciate or what are my options.
Tags (2)
0 Kudos
11 Replies
karlkliparchuk1
Emerging Contributor
You could also try building the form using Tkinter.  You need to import tkinter into your python code before using.  There is sample code around that ESRI has developed showing scroll boxes, pick lists, etc.
0 Kudos
ChrisSnyder
Honored Contributor
Like Kim was saying... use the win32com module to give Python access to your form:

from win32com.client import Dispatch
strDbName = 'my_database.mdb'
objAccess = Dispatch("Access.Application")
objAccess.Visible = False
objAccess.OpenCurrentDatabase(strDbName)
objDB = objAccess.CurrentDb()
objAccess.OpenForm('my_form')


You should be able to drill down even farther to the actual form objects... for example, interactively populate the form's lat/long info. It works just like VBA once you have a COM hook into the objAccess.
0 Kudos