get error 2455 invalid reference to property

J

Jason

When I tab (or shift-tab) into the first/last field of the next/previous
record I get:
Run-time error '2455'
You entered an expression that has an invalid reference to the property
Form/Report
The property may not exist or may not apply to the object you specified.
[Debug] [] [End] [Help]

but no comprehensible help

Thanks,
J.
 
J

Jason

More detail:
This does not happen if I go to new record by using the record selectors at
the bottom of the form.
code:
If len(FieldName & "") = 0 then
'ok
SubFormName.Form.AllowAdditions = false
else
'generates error only when using tab or shift tab that causes new record
to be shown
SubFormName.Form.AllowAdditions = true
endif
 
J

Jason

I now use cycle current record instead of all records
1. stops error
2. I had no intention of going to previous or next record when tabbing
anyway so I'll stick with cycle current record.

Jason said:
More detail:
This does not happen if I go to new record by using the record selectors at
the bottom of the form.
code:
If len(FieldName & "") = 0 then
'ok
SubFormName.Form.AllowAdditions = false
else
'generates error only when using tab or shift tab that causes new record
to be shown
SubFormName.Form.AllowAdditions = true
endif
Jason said:
When I tab (or shift-tab) into the first/last field of the next/previous
record I get:
Run-time error '2455'
You entered an expression that has an invalid reference to the property
Form/Report
The property may not exist or may not apply to the object you specified.
[Debug] [] [End] [Help]

but no comprehensible help

Thanks,
J.
 
J

Jason

These lines work fine when I don't use tab (use < or >) (I.E. I can not add
records to a subform if there is no record in the main form). I then have
code in the mainform:
FieldName_Afterupdate
If len(FieldName & "") = 0 then
SubFormName.Form.AllowAdditions = true
endif
This afterupdate code works fine
 
J

Jason

If I do not use SubFormName.Form.AllowAdditions = false:
Then why can I add records in a subform if the main form is not a current
record (a new record with nothing typed into it).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top