Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The IsNull function requires 2 arguments

4 views
Skip to first unread message

Eric J Owens

unread,
Dec 16, 2003, 12:50:34 PM12/16/03
to
TIA!

I recently moved some forms from an a2k mdb file to an a2k adp. There is
now an error when opening one of the forms 'the isnull function requires 2
arguments', but I only find references to IsNull() having 1 argument. Here
is an example of the offending code:

-----------------------------
Private Sub AEnd_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "EngData (Port Editor)"
If IsNull(Me!ID) Then
Exit Sub
Else
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

End Sub
------------------------------

Also, related to moving forms from an mdb to an adp, I get this error:

"No column was specified for column 2 of 'DRVD_TBL'"

This error shows up on a form/subform when run together; when the forms are
run seperately, no error.

master field: LanEquipment.ID
child field: LanAssignment.LanEquipment_ID

...so, if someone would be so kind as to help a brother out, I would be
quite grateful.

Regards,

Eric J Owens
AT&T Business Services/MasterCard LCM
Network Design Engineering
ejowens.k.n...@att.com


Terry Kreft

unread,
Dec 17, 2003, 8:24:18 AM12/17/03
to
Try
If Me!ID Is Null Then

or (probably better in this case)

If Len(Trim(Me!ID & "")) < 1 Then


Terry


"Eric J Owens" <ejowens.k.n...@att.com> wrote in message
news:brngbh$q0...@kcweb01.netnews.att.com...

Trevor Best

unread,
Dec 17, 2003, 1:49:26 PM12/17/03
to

It's probably not complaining about your VBA code, in VBA IsNull takes
1 argument, perhaps you have IsNull in your query (which is now a SQL
view?), in T-SQL IsNull() is the equivelant of VBA's Nz().

--
A)bort, R)etry, I)nfluence with large hammer.

Eric J Owens

unread,
Dec 18, 2003, 2:20:38 PM12/18/03
to
Thnx for the insight!


ejo


Steve Jorgensen

unread,
Dec 19, 2003, 1:11:35 AM12/19/03
to

That was my thought as well, but it would only be an issue if the database is
an ADP or ADE. Otherwise, the expression service would forward the IsNull
call to the expression service which would hand it off to VBA.

Of couse, in any quuery, JET or T-SQL, you can and should use the IS NULL
operator to check for nulls, not the IsNull function.

Example:

SELECT * FROM tblFoo Where [FooName] Is Null

Trevor Best

unread,
Dec 20, 2003, 7:59:19 AM12/20/03
to
On Fri, 19 Dec 2003 06:11:35 GMT in comp.databases.ms-access, Steve
Jorgensen <nos...@nospam.nospam> wrote:

>That was my thought as well, but it would only be an issue if the database is
>an ADP or ADE.

It was just moved to an ADP.

Steve Jorgensen

unread,
Dec 22, 2003, 10:49:29 AM12/22/03
to
On Sat, 20 Dec 2003 12:59:19 +0000, Trevor Best <bouncer@localhost> wrote:

>On Fri, 19 Dec 2003 06:11:35 GMT in comp.databases.ms-access, Steve
>Jorgensen <nos...@nospam.nospam> wrote:
>
>>That was my thought as well, but it would only be an issue if the database is
>>an ADP or ADE.
>
>It was just moved to an ADP.

Ah - right.

Sorry, I didn't read the initial post correctly.

0 new messages