Results 1 to 12 of 12

Thread: Access form search

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    144

    Access form search

    Each time a search through the database and get to a certain record i get the following error message

    'Can't set value to NULL when checkbox property = FALSE'

    But i aintgot any checkboxes on my form


    can any one explain?

    Thanks

    James Bowtell

    ==========================================================
    UPDATE
    ==========================================================

    Hey guys

    Just a quick update

    I have three tables

    tbl_Appliance
    Appliance_No
    Serial_No
    Room_No
    Appliance_Type
    Appliance_Manufacturer
    Appliance_Model
    Appliance_Model

    tbl_ServiceHistory
    Service_ID
    Appliance_No
    PATTest_ID
    Service_Date

    tbl_PAT

    PATTest_ID
    PAT_Class
    PAT_FuseRating
    PAT_VisualCheck (Checkbox)
    PAT_insulation (Checkbox)
    PAT_EarthBond (Checkbox)
    PAT_Result
    PAT_Notes

    i have noticed that the above error appears when 1 of the 3 checkboxes are ticked

    does this help?
    Last edited by JamesBowtell; Mar 30th, 2005 at 04:01 AM.

  2. #2
    Addicted Member
    Join Date
    Jan 2002
    Location
    Glasgow, Scotland
    Posts
    202

    Re: Access form search

    is the checkbox related to another table?

    and are you doing a find>replace? or just a search?
    if you fail to plan, you plan to fail

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    144

    Re: Access form search

    No the table tbl_PAT is only related to the table tbl_ServiceHistory and the table tbl_Appliance is related to the table tbl_ServiceHistory also.

    At the moment i'm just searching through the data.

    Any ideas would be great

    Thanks
    James Bowtell

  4. #4
    Addicted Member
    Join Date
    Jan 2002
    Location
    Glasgow, Scotland
    Posts
    202

    Re: Access form search

    have you programmed the search?
    or are you just using the inbuilt Access Search?
    if you fail to plan, you plan to fail

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    144

    Re: Access form search

    Using the inbuilt

  6. #6
    Addicted Member
    Join Date
    Jan 2002
    Location
    Glasgow, Scotland
    Posts
    202

    Re: Access form search

    seems a bit strange.

    is there any code running related to the search that could be trying to update that field?

    can you set a break point to see if it is code that is causing the error
    if you fail to plan, you plan to fail

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    144

    Re: Access form search

    Created a break point no problems detected!

    It's wierd...i give you that...pain in the arse too, spoils my program...lol

  8. #8
    Addicted Member
    Join Date
    Jan 2002
    Location
    Glasgow, Scotland
    Posts
    202

    Re: Access form search

    just had a thought..

    is the form you are searching based on a query?

    and does the query have any expressions/calculations?
    if you fail to plan, you plan to fail

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    144

    Re: Access form search

    Built using a simple query no calc's or expressions!

  10. #10
    Addicted Member
    Join Date
    Jan 2002
    Location
    Glasgow, Scotland
    Posts
    202

    Re: Access form search



    ok im stuck.

    its probably something really simple...
    if you fail to plan, you plan to fail

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    144

    Re: Access form search

    I have narrowed it down to one problem....everything works now..(dunno how though) searches no prob..but when i navigate through the records using the mouse scroller then it generates the error...wierd...heh

  12. #12
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Access form search

    Do the records with the checkboxes have true/false set (and not a null value) ?

    I ask because, perhaps, there is a null value and the checkbox itself is set not to allow nulls (vaguely recall that a check box can have true, false and null, but has to be set to allow the third state... possibly cannot be set to null if its already a true/false value).

    In your query for returning the checkbox values, use
    Code:
    nz([fieldname],false) as fieldnamee
    to default them to false (unchecked)

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width