Help with ERROR: 2450

Help with ERROR: 2450

am 15.01.2008 16:25:51 von phoebus

Hi,

I am trying to fix an access database for someone. They are having an
issue on a particular form when entering data. When any character gets
typed into the form, the below error gets displayed:

Run-time error '2450'
Microsoft Office Access can't find the form 'Create form 471' referred
to in a macro expression or Visual Basic code.

When I hit debug, it takes me to the following method:

Private Sub Form_Dirty(Cancel As Integer)
Me![471#] = Forms![Create Form 471]![Create Form 471 Info
Subform].Form![471#]
Me![FY] = Forms![Create Form 471]![Create Form 471 Info
Subform].Form![FY]
Me![BEN] = Forms![Create Form 471]![Create Form 471 Info
Subform].Form![BEN]
End Sub

I'm not very good with VB code, could somebody explain to me what
those lines are doing, and maybe share any ideas on how to fix the
issue at hand?

Thanks so much

Re: Help with ERROR: 2450

am 15.01.2008 17:40:01 von Salad

phoebus@gmail.com wrote:

> Hi,
>
> I am trying to fix an access database for someone. They are having an
> issue on a particular form when entering data. When any character gets
> typed into the form, the below error gets displayed:
>
> Run-time error '2450'
> Microsoft Office Access can't find the form 'Create form 471' referred
> to in a macro expression or Visual Basic code.
>
> When I hit debug, it takes me to the following method:
>
> Private Sub Form_Dirty(Cancel As Integer)
> Me![471#] = Forms![Create Form 471]![Create Form 471 Info
> Subform].Form![471#]
> Me![FY] = Forms![Create Form 471]![Create Form 471 Info
> Subform].Form![FY]
> Me![BEN] = Forms![Create Form 471]![Create Form 471 Info
> Subform].Form![BEN]
> End Sub
>
> I'm not very good with VB code, could somebody explain to me what
> those lines are doing, and maybe share any ideas on how to fix the
> issue at hand?
>
> Thanks so much

I'll take a stab.

Me is your current form. On it, you have (maybe) the fields called 471#
(weird-ass name), FY, and BEN.

You are assigning, from a subform called "Create Form 471 Info
Subform" (Man, I really hate spaces in form names and fields) in the
form "Create Form 471" the associated fields 471#, FY, and BEN.

The message "Microsoft Office Access can't find the form 'Create form
471' is basically stating that that form isn't open. So it's hard to
assign those values to your current form. If you open that form/subform
and are on the correct record then it should work correctly.

Aloha 'Oe
http://www.youtube.com/watch?v=VW4v_cTMGgM