pyaccesskit.forms.collection¶
pyaccesskit.forms.collection ¶
Forms: the db.forms collection and :class:Form handles (building forms needs Microsoft Access).
Form ¶
Form(session: Session, name: str)
FormCollection ¶
FormCollection(session: Session)
db.forms.
create ¶
create(
name: str, *, replace: bool = False, **form_options: Any
) -> FormBuilder[Form]
Start building a form; nothing is created in Access until the builder is saved.
Example::
with db.forms.create("frmCustomers", record_source="Customers") as form:
form.textbox("CustomerName")
# built atomically here
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Form name. |
required |
replace
|
bool
|
Rebuild the form if it already exists (atomically swapped in). |
False
|
**form_options
|
Any
|
Any :class: |
{}
|
build ¶
build(spec: FormSpec, *, replace: bool = False) -> Form
Build a form from a finished :class:FormSpec (atomically).