|
-
Mar 30th, 2005, 03:51 AM
#1
Thread Starter
Addicted Member
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.
-
Mar 30th, 2005, 07:38 AM
#2
Addicted Member
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
-
Mar 31st, 2005, 04:59 AM
#3
Thread Starter
Addicted Member
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
-
Mar 31st, 2005, 05:12 AM
#4
Addicted Member
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
-
Mar 31st, 2005, 05:12 AM
#5
Thread Starter
Addicted Member
-
Mar 31st, 2005, 05:17 AM
#6
Addicted Member
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
-
Mar 31st, 2005, 05:27 AM
#7
Thread Starter
Addicted Member
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
-
Mar 31st, 2005, 05:29 AM
#8
Addicted Member
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
-
Mar 31st, 2005, 05:40 AM
#9
Thread Starter
Addicted Member
Re: Access form search
Built using a simple query no calc's or expressions!
-
Mar 31st, 2005, 05:43 AM
#10
Addicted Member
Re: Access form search
ok im stuck.
its probably something really simple...
if you fail to plan, you plan to fail
-
Mar 31st, 2005, 06:34 AM
#11
Thread Starter
Addicted Member
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
-
Mar 31st, 2005, 08:40 AM
#12
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)
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|