Invalid Argument Error

  • Thread starter Thread starter rudwaan
  • Start date Start date
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 ?
 
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,
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]...
 
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 ?


.


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


.


.
 
Back
Top