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.
(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.