Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2008

Tip: Looking for answers? Try searching our database.

Runtime Error 94 when entering a new record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bellyjeans - 20 May 2008 18:41 GMT
Hi all,

I have two text boxes in a form that are only visible if their
respective check boxes are clicked.  The coding on the After Update
event of the check boxes is as follows:

Check box one:

   Me.txtOne.Visible = Me.chkOne

Check box two:

       Me.txtTwo.Visible = Me.chkTwo

I then have the following code on the form's On Current event:

    Me.txtOne.Visible = Me.chkOne
    Me.txtTwo.Visible = Me.chkTwo

The problem is when I create a new record.  My error looks like "94 -
Invalid Use of Null - Form_Current()".  Where am I going wrong on my
form's On Current event?

Thanks in advance.
Douglas J. Steele - 20 May 2008 18:49 GMT
I'm guessing that one or both of the check boxes aren't initialized (that
they're showing up as Gray, not White or Checked).

Try:

   Me.chkOne = False
   Me.chkTwo = False
   Me.txtOne.Visible = Me.chkOne
   Me.txtTwo.Visible = Me.chkTwo

or

   Me.txtOne.Visible = Nz(Me.chkOne, False)
   Me.txtTwo.Visible = Nz(Me.chkTwo, False)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi all,
>
[quoted text clipped - 20 lines]
>
> Thanks in advance.
Bellyjeans - 20 May 2008 19:47 GMT
> I'm guessing that one or both of the check boxes aren't initialized (that
> they're showing up as Gray, not White or Checked).
[quoted text clipped - 41 lines]
>
> - Show quoted text -

It worked.  Thanks Doug!  You always give such great advice.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.