We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

Why .columns.getbyname fails when Form.getbyname works?

asked 2021-04-27 21:18:08 +0200

GABALEY gravatar image

LO macro trying to update form fields fails with "No elelment named ..." WHY? image description

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-04-27 22:17:01 +0200

Ratslinger gravatar image

updated 2021-04-27 22:38:13 +0200

Hello,

oForm.getByName("your_control")

gets access to a control on the form.

oForm.Columns.getByName("your_field_name")

get access to the field in the current record for the table associated with this form.

These are two different entities.

You error is stating there is no field named "Reg_Cty" in the table assigned to that form.

Edit:

For control/field updating you may want to look at this post -> Table not updating from form when 'default' values applied

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-04-27 21:18:08 +0200

Seen: 19 times

Last updated: Apr 27