Help!! Run-time error 2455 : ....invalid reference to the property Form/Report

  • Thread starter Trev Clarke via AccessMonster.com
  • Start date
T

Trev Clarke via AccessMonster.com

Hi there,

(This is my first posting to the forum after spending most of the night trying to solve my problem. Other posters here seem to have had the same or similar problems but I have not been able to find a solution among the many replies. I apologise if I have missed the crucial piece of info I need.)

I have a single form with a subform and am trying to use a macro from the main form to alter the value of an unbound option group on the subform. I keep getting the error message:

Run-time error '2455': You entered an expression that has an invalid reference to the property Form/Report.

I am using SetValue in the macro, with an Item argument of :
[Forms]![Timesheet]![subDay].[Form]![optDay]

The linking between the main form and subform seems to be fine with the correct records being displayed in all cases. The option group is used to select the required subfrom record from among those relating to the main form record. This works fine, but when a new record is selected on the main form, the subform displays the first relevant record and the option group may be out of sync. Hence, it seemed a simple task to set the option group to its first value whenever the main form record changes. Now, after many tears and a large bruise on my forehead, I am not so self-assured.

One thing I have noticed from the forum is that you clever folks always need extra info ;o) , so I'll list as much as I can think of below. From the look of the other posts and the fact that I believe the reference is exactly as stated in the help files, I suspect some problem caused by a windows update.

Thanks for reading this and for any help you can give.

Trev.

Further info
============
Access: Access 97 SR-2
Windows: XP Pro Version 5.1 (Build 2600.xpsp_sp2_rtm.040803-2158 : Service Pack 2)
Main form: Timesheet
Sub form: Day
Sub form control on main form: subDay
Option group on sub form: optDay
Main form linked to 'Weeks' table. Key 'Week'.
Sub form linked to 'Days' table. Key 'Week'/'Weekday' (Weekday has values 1 to 7 for each week)
All operations are being done via macros.
 
G

G. V.

If I understand your post correctly, your main form should always govern
what data that is shown in the sub form not the other way around. As long as
you have your Master Field and Child Field links correctly it should display
any sub records that belong to the main form.

Are you wanting to use the radio button to filter the subform records
further once you selected the main form record?

Hypothetical Example. You select a company called "Main Company" on your
Main form. It displays 20 records on the subform. Of those 20 records you
only want to see those that are from a particular Region, such as Northwest.
This is where you would use code behind each of those radio buttons, which
are placed on the subform not the main form, to filter out for each
selection.

I don't believe a macro is the best method.

Hope this helps.


Trev Clarke via AccessMonster.com said:
Hi there,

(This is my first posting to the forum after spending most of the night
trying to solve my problem. Other posters here seem to have had the same or
similar problems but I have not been able to find a solution among the many
replies. I apologise if I have missed the crucial piece of info I need.)
I have a single form with a subform and am trying to use a macro from the
main form to alter the value of an unbound option group on the subform. I
keep getting the error message:
Run-time error '2455': You entered an expression that has an invalid
reference to the property Form/Report.
I am using SetValue in the macro, with an Item argument of :
[Forms]![Timesheet]![subDay].[Form]![optDay]

The linking between the main form and subform seems to be fine with the
correct records being displayed in all cases. The option group is used to
select the required subfrom record from among those relating to the main
form record. This works fine, but when a new record is selected on the main
form, the subform displays the first relevant record and the option group
may be out of sync. Hence, it seemed a simple task to set the option group
to its first value whenever the main form record changes. Now, after many
tears and a large bruise on my forehead, I am not so self-assured.
One thing I have noticed from the forum is that you clever folks always
need extra info ;o) , so I'll list as much as I can think of below. From the
look of the other posts and the fact that I believe the reference is exactly
as stated in the help files, I suspect some problem caused by a windows
update.
 

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