-
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?
-
Re: Access form search
is the checkbox related to another table?
and are you doing a find>replace? or just a search?
-
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
-
Re: Access form search
have you programmed the search?
or are you just using the inbuilt Access Search?
-
Re: Access form search
-
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
-
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
-
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?
-
Re: Access form search
Built using a simple query no calc's or expressions!
-
Re: Access form search
:confused:
ok im stuck.
its probably something really simple...
-
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
-
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)