From: Jacco on
This subject is abundant if typed in Google, but I keep getting a mistake,

I have created a Form Called "Edit Aircraft". I want this form to be opened
by another form. I inserted the Sample code found in the help-file:

Private Sub Form_Open(Cancel As Integer)
Dim intReturn As Integer
intReturn = MsgBox("Do you want to configure your aircraft now?",
vbYesNo)
Select Case intReturn
Case vbYes
' Open Order Details form.
DoCmd.OpenForm "Edit Aircraft"
Case vbNo
MsgBox "Remember to configure this aircraft at a later time"
Cancel = True ' Cancel Open event.
End Select
End Sub

This triggers a error when the form is being opened saying:

Procedure declaration does not match description event or procedure having
the same name.

I set the property for Form On Open [event procedure]

I don't understand what the problem is. I created a new Form "Form1" and
inserted just the OnOpen event, and it works as advertised.

Anyone knows where the problem is?

Jacco


From: Andi Mayer.. on
On Tue, 22 Feb 2005 08:56:54 +0100, "Jacco" <jacco[at]vliegt.nl>
wrote:

>This subject is abundant if typed in Google, but I keep getting a mistake,
>
>I have created a Form Called "Edit Aircraft". I want this form to be opened
>by another form. I inserted the Sample code found in the help-file:
>
>Private Sub Form_Open(Cancel As Integer)
> Dim intReturn As Integer
> intReturn = MsgBox("Do you want to configure your aircraft now?",
>vbYesNo)
> Select Case intReturn
> Case vbYes
> ' Open Order Details form.
> DoCmd.OpenForm "Edit Aircraft"
> Case vbNo
> MsgBox "Remember to configure this aircraft at a later time"
> Cancel = True ' Cancel Open event.
> End Select
>End Sub
>
>This triggers a error when the form is being opened saying:
>
>Procedure declaration does not match description event or procedure having
>the same name.
>
>I set the property for Form On Open [event procedure]
>
>I don't understand what the problem is. I created a new Form "Form1" and
>inserted just the OnOpen event, and it works as advertised.
>
>Anyone knows where the problem is?
>
>Jacco
>

Where is this code?
if it's in the Form "Edit Aircraft" then it will fail

do you have a button on the calling form?
if yes then insert the code into the onClick-event of this button
--
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
From: Steve Schapel on
Jacco,

Which form are you putting this on the Open event of? It seems strange
to be opening a form via the Open event of another form, and if it's the
same form it is bound to cause confusion.

--
Steve Schapel, Microsoft Access MVP


Jacco wrote:
> This subject is abundant if typed in Google, but I keep getting a mistake,
>
> I have created a Form Called "Edit Aircraft". I want this form to be opened
> by another form. I inserted the Sample code found in the help-file:
>
> Private Sub Form_Open(Cancel As Integer)
> Dim intReturn As Integer
> intReturn = MsgBox("Do you want to configure your aircraft now?",
> vbYesNo)
> Select Case intReturn
> Case vbYes
> ' Open Order Details form.
> DoCmd.OpenForm "Edit Aircraft"
> Case vbNo
> MsgBox "Remember to configure this aircraft at a later time"
> Cancel = True ' Cancel Open event.
> End Select
> End Sub
>
> This triggers a error when the form is being opened saying:
>
> Procedure declaration does not match description event or procedure having
> the same name.
>
> I set the property for Form On Open [event procedure]
>
> I don't understand what the problem is. I created a new Form "Form1" and
> inserted just the OnOpen event, and it works as advertised.
>
> Anyone knows where the problem is?
>
> Jacco
>
>
From: Jacco on
I'll let it be for now. I recreated the form, and now it seems to work for a
while. Maybe I'll bump into the issue again later
"Steve Schapel" <schapel(a)mvps.org.ns> wrote in message
news:OBs$BAMGFHA.228(a)TK2MSFTNGP15.phx.gbl...
> Jacco,
>
> Which form are you putting this on the Open event of? It seems strange to
> be opening a form via the Open event of another form, and if it's the same
> form it is bound to cause confusion.
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> Jacco wrote:
>> This subject is abundant if typed in Google, but I keep getting a
>> mistake,
>>
>> I have created a Form Called "Edit Aircraft". I want this form to be
>> opened by another form. I inserted the Sample code found in the
>> help-file:
>>
>> Private Sub Form_Open(Cancel As Integer)
>> Dim intReturn As Integer
>> intReturn = MsgBox("Do you want to configure your aircraft now?",
>> vbYesNo)
>> Select Case intReturn
>> Case vbYes
>> ' Open Order Details form.
>> DoCmd.OpenForm "Edit Aircraft"
>> Case vbNo
>> MsgBox "Remember to configure this aircraft at a later time"
>> Cancel = True ' Cancel Open event.
>> End Select
>> End Sub
>>
>> This triggers a error when the form is being opened saying:
>>
>> Procedure declaration does not match description event or procedure
>> having the same name.
>>
>> I set the property for Form On Open [event procedure]
>>
>> I don't understand what the problem is. I created a new Form "Form1" and
>> inserted just the OnOpen event, and it works as advertised.
>>
>> Anyone knows where the problem is?
>>
>> Jacco
>>

 | 
Pages: 1
Prev: Application Error
Next: Repost - MSysCompactError