Connect and share knowledge within a single location that is structured and easy to search. I have a table containing null values as dates, 10 in all. In a query based on this table, I want to compare a date in the record with a reference date which I am doing fine with Access VBA.
Any of the fields in the record containing dates on the table could be NULL. For example two non - null dates, followed by a null date, followed by a final non - null date field. Appreciate the help from the community! Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Handling null date values in Access queries Ask Question. Maybe you could provide some more details on how you import the data?
Otherwise you might run a update query after the import nulling the field if its equal to I'm guessing the error message occurs before that line Rajeev. It's very hard to help when only such a small part of the issue is explained or shared though. My guess is that you would fix this by importing the data first into a table that has no restrictions on what data is imported then, and only then, worry about converting that data into a form that makes sense in your system.
I'm hoping this makes sense for you. It's hard to know what to answer when the question leaves out so much necessary information. Rajeevs, If Smiley's Null does not work, you could also try "", which would have a similar effect. Another option is to use code to determine if the value is Null, just bypass adding a value to your field, which is somewhat clumsy.
Your goal should be to do as you are doing, checking the validity of the value, then assigning the value to your field. Thank you all. I figured out the reason - there was another field also taking the same info and i didnot notice that. Now i have corrected that. It is taking null now.
Thank you all for the support. Post Reply. PostgreSQL Database. Could anyone please help me out asap on this issue.. Notice how the dates on the first column is right justified and the date on the right column is left justified?
That's because you're dealing with a Text value. Try the following expression:. Also, have you verified that the field is actually "Null? Am not trying to update the whole table the fileds which have NULL.. I need to Calculate the no. Thanks for the clarification. When you said that you wanted to "replace" the values, I thought you meant "permanently. Shouldn't you use today's date to count the number of days until today? To do that, you can use:. Yes, Access has a Replace and IsNull function but I asked you earlier if you're sure we're dealing with an actual Null value because Nulls are not the same as Empty.
You might be getting the error if you have null values for CheckInDate as well.
0コメント