Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error 2427 on form in an ADP(worked in MDB)

Status
Not open for further replies.

embryo

Programmer
Nov 27, 2004
46
US
I've just upsized an MDB to SQL Server 2k and have created an ADP to use as the front end. Evidentally, since I had Access 2000, only the tables were upsized. I'm now trying to convert all my queries into either Views or Sproc's and having many difficulties, but the main problem is that
I have a form that has the below code specified:
--------------------------------------------------
Private Sub Form_Load()

If Check110.Value = True Then
Label111.Caption = "Merchandise Account"
Text113.Enabled = True
Merch_value.Enabled = True
Merch_status.Enabled = True
Else
Label111.Caption = "Non-Merchandise Account"
Text113.Enabled = False
Merch_value.Enabled = False
Merch_status.Enabled = False
End If

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

It was intended that when the form loaded that it would check the value of a checkbox named "Check110" and conditionally enable/disable other fields(grey-out) on the form...it worked fine in the previous MDB..

As you can see, it is very simple VB code, but when the form loads, it throws this error:
"Run-time error 2427:

You entered an expression that has no value."

...and when I debug it, it points to the first line of the subroutine:
----------------------------------
If Check110.Value = True Then
----------------------------------

Any idea why this would work fine in an MDB and not an ADP?

Thanks,
Steve
 
I don't know, but my guess from the error message is that the field is Null. Try forcing Null to some value and see what happens.

If nz(Check110.Value,0) = True Then
 
OK, I got past that hurdle...evidentally, when i copied in that form from the MDB to the ADP, it somehow lost the default value criteria, and thus as cmmrfrds suggested, was really null...

I went out and got Office 2003 and upsized again...this time, a whole lot more of it was successful..though not everything...mostly, it's the forms that are behaving strangely...

Look for other hair-pulling posts from me...

Thanks,
Steve

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top