Invalid Argument Error

R

rudwaan

hi
i have one form inside it opening another form through one
button using open arg method , it was working perfectly ,
suddenly , i dont remember what mistake i did , it
doesnot work , it send me message " invalid procedure or
argument " , it opens the other form , but without any
consideration of the argument from th efirst form
what could i do ?
 
R

rudwan

actually that is my code
Sub AddProducts_Click()

On Error GoTo Err_AddProducts_Click

Dim strDocName As String

strDocName = "AdjTeleph"

DoCmd.OpenForm strDocName, , , , acFormAdd, acDialog, Me!
AccID


Forms![adjteleph]!ProductName.SetFocus

Exit_AddProducts_Click:
Exit Sub

Err_AddProducts_Click:
MsgBox Err.Description
Resume Exit_AddProducts_Click

End Sub

it was working ok , but i think since i added " Microsoft
Dao References , it doesnt work , then i removed that
reference , but it still not working , not only this code
also another same codes for opening another forms


-----Original Message-----
Hi,
Post your code so that someone may help you.

--
HTH
Dan Artuso, Access MVP


"rudwaan" <[email protected]> wrote in
message news:[email protected]...
 
D

Dan Artuso

Hi,
Try using Me.AccID and see if that makes a difference.

--
HTH
Dan Artuso, Access MVP


rudwan said:
actually that is my code
Sub AddProducts_Click()

On Error GoTo Err_AddProducts_Click

Dim strDocName As String

strDocName = "AdjTeleph"

DoCmd.OpenForm strDocName, , , , acFormAdd, acDialog, Me!
AccID


Forms![adjteleph]!ProductName.SetFocus

Exit_AddProducts_Click:
Exit Sub

Err_AddProducts_Click:
MsgBox Err.Description
Resume Exit_AddProducts_Click

End Sub

it was working ok , but i think since i added " Microsoft
Dao References , it doesnt work , then i removed that
reference , but it still not working , not only this code
also another same codes for opening another forms


-----Original Message-----
Hi,
Post your code so that someone may help you.

--
HTH
Dan Artuso, Access MVP


"rudwaan" <[email protected]> wrote in
message news:[email protected]...
 
R

rudwan

i trieyd it , but still same .
-----Original Message-----
Hi,
Try using Me.AccID and see if that makes a difference.

--
HTH
Dan Artuso, Access MVP


"rudwan" <[email protected]> wrote in
message news:[email protected]...
actually that is my code
Sub AddProducts_Click()

On Error GoTo Err_AddProducts_Click

Dim strDocName As String

strDocName = "AdjTeleph"

DoCmd.OpenForm strDocName, , , , acFormAdd, acDialog, Me!
AccID


Forms![adjteleph]!ProductName.SetFocus

Exit_AddProducts_Click:
Exit Sub

Err_AddProducts_Click:
MsgBox Err.Description
Resume Exit_AddProducts_Click

End Sub

it was working ok , but i think since i added " Microsoft
Dao References , it doesnt work , then i removed that
reference , but it still not working , not only this code
also another same codes for opening another forms


-----Original Message-----
Hi,
Post your code so that someone may help you.

--
HTH
Dan Artuso, Access MVP


"rudwaan" <[email protected]> wrote
in
message news:[email protected]...
hi
i have one form inside it opening another form
through
one
button using open arg method , it was working perfectly ,
suddenly , i dont remember what mistake i did , it
doesnot work , it send me message " invalid procedure or
argument " , it opens the other form , but without any
consideration of the argument from th efirst form
what could i do ?


.


.
 
D

Dan Artuso

Hi,
Sorry, I can't see anything else wrong. Try re-creating the button.

--
HTH
Dan Artuso, Access MVP


rudwan said:
i trieyd it , but still same .
-----Original Message-----
Hi,
Try using Me.AccID and see if that makes a difference.

--
HTH
Dan Artuso, Access MVP


"rudwan" <[email protected]> wrote in
message news:[email protected]...
actually that is my code
Sub AddProducts_Click()

On Error GoTo Err_AddProducts_Click

Dim strDocName As String

strDocName = "AdjTeleph"

DoCmd.OpenForm strDocName, , , , acFormAdd, acDialog, Me!
AccID


Forms![adjteleph]!ProductName.SetFocus

Exit_AddProducts_Click:
Exit Sub

Err_AddProducts_Click:
MsgBox Err.Description
Resume Exit_AddProducts_Click

End Sub

it was working ok , but i think since i added " Microsoft
Dao References , it doesnt work , then i removed that
reference , but it still not working , not only this code
also another same codes for opening another forms



-----Original Message-----
Hi,
Post your code so that someone may help you.

--
HTH
Dan Artuso, Access MVP


message hi
i have one form inside it opening another form through
one
button using open arg method , it was working
perfectly ,
suddenly , i dont remember what mistake i did , it
doesnot work , it send me message " invalid procedure or
argument " , it opens the other form , but without any
consideration of the argument from th efirst form
what could i do ?


.


.
 

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