By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

The IsNull function requires 2 arguments

P: n/a
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
ej*********************@att.com
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Try
If Me!ID Is Null Then

or (probably better in this case)

If Len(Trim(Me!ID & "")) < 1 Then
Terry
"Eric J Owens" <ej*********************@att.com> wrote in message
news:br**********@kcweb01.netnews.att.com...
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
ej*********************@att.com

Nov 12 '05 #2

P: n/a
On Tue, 16 Dec 2003 11:50:34 -0600 in comp.databases.ms-access, "Eric
J Owens" <ej*********************@att.com> wrote:
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.


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.
Nov 12 '05 #3

P: n/a
Thnx for the insight!
ejo
Nov 12 '05 #4

P: n/a
On Wed, 17 Dec 2003 18:49:26 +0000, Trevor Best <bouncer@localhost> wrote:
On Tue, 16 Dec 2003 11:50:34 -0600 in comp.databases.ms-access, "Eric
J Owens" <ej*********************@att.com> wrote:
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.


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().


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
Nov 12 '05 #5

P: n/a
On Fri, 19 Dec 2003 06:11:35 GMT in comp.databases.ms-access, Steve
Jorgensen <no****@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.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #6

P: n/a
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 <no****@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.
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.