Topics Search

If Form Field is not null then...

If Form Field is not null then...
Views: 97
I have a field called [Warning] in a form that I want to simply populate with the word NOT under a particular condition. That condition being if a field called [Model] is Not Null -AND- a field called [Year] is NULL then the [Warning] field will be the word NOT. I tried putting an expression together in the Control Source for the [Warning] field but was getting errors.
Sponsored Links:

More topics

 

updating field whose value is the word NULL and Not a typical 'null' value

Preview
I was given a table where in a text field, the value is NULL. (Actually spelled out like that.)
I need to convert that field to a date/time one. Which is being hindered by these values of NULL.

The problem is that when I put the word NULL in the field criteria spot, Access believes that I am referring to a value of 'null' and will not do the update.
I have done "NULL", NULL, =NULL, ="NULL", is NULL. and no success.
Please remember that the actual value is not 'null'. It is a text field that has the word NULL in the field.
 

Null Values in queries

Preview
This has probably been discussed but I can't find the answer.

I want to query using a form. If a form field is empty I want the query to return all results from the table including null fields.

If I query 'Is Null' then it does return the null fields (indicating that the fields are, in fact bona fide null fields).

If I query Like IIf(IsNull([Forms]![Form1]![Date]),Is Null,"*12") - then, when the form field is null, it doesn't return the Is Null fields. (I've checked by substituting another expression that the Iif is returning 'True
 

Passing criteria "NULL" or "IS NOT NULL" to a query

Preview
I want to pass the criteria "NULL" or "IS NOT NULL" to the underlying query in a report from a field on a form where all criteria for the particular report is selected before running the report. Typicially the procedure I use is to place the name of the control from the form in the criteria field of the query. example. if I'm providing a date to the query, I put a date field on the form and put the full name of the field "forms!myform!fieldname" in the criteria field of the query underlying the report. This is pretty bullet proof, except when I want to pass a value of "null", or "not null" as the criteria for a given field in the query. How can I set up a combo box, or command button, or selection box to feed the values "NULL" or "NOT NULL" as criteria the underlying query
 

Control not picking up value from other field/How do I save with a null?

Preview
I have added 2 fields (combo boxes) to a form. A value is chosen for the first field. The second field chooses a value based on the selection from the first field.

The second field doesn't't seem to be picking up this value. When I click on the down arrow, there are no selections.

Secondly, I want to be able to save the form with both of these fields being blank. However, when I try to do this, I get an error message:"You tried to assign a Null value to a variable that is not a Variant data type". How do I allow the form to save when these 2 fields are null?
 

Concatenate multiple fields that might have a null value

Preview
Hope someone can help. I'm trying to concatenate many fields into one field and some have a null value. And some need to have a description added in front of the value.
Field1 = Bldg Name (maybe null)
Field2 = Street
Field3 = Floor (maybe null)
Field4 = Room (maybe null)
Field5 = City

My problem is that in front of [Floor] should be "FL:" only if that field is not null. However, I keep getting the "FL:" in front of everything. How do I not include that when that specific field is null?
 

Form Error 'Field Cannot be Null' but field has data

Preview
I am having a problem with a form when it posts to the table.

Most of the form is filled automatically by a query, I only select an 'option' from a dropdown list and then enter 2 dates.

When I try to submit the form I get an error that the 'Option' field cannot be null. However the field isn't null it contains the value that I selected from the list AND the record is beingcreated in the db despite the error message indicating that it can't be.

Could this be related to the 'Option' field being unbound?
 

Using Filter by Form

Preview
I have a form (Access 2003) that I want to use Filter by Form on. There are over 50,000 records behind this form. When I use the dropdown lists beside the fields, it say is Null or is not null.

I know I have used filter by form before and the dropdown lists contain what is actually in the field. Is there anyway to get this data to appear instead of Is Null or Is not Null?
 

How to filter form when value selected from combobox is null?

Preview
I have a combobox which has null as a valid value.I want the form to get filtered when user selects null as a value also.However no filtering happens when the value is null.I would liketo know is whether it is possible to filter if the record selected is null as the filter criteria will be empty string then?I am not posting any code as my question is just that can criteriabe null and still filter?
 

Updating Null Field

Preview
When I click on a field O# in a form and if the field in T# is null I want to update the T# to
 

Auto Populate Field Based on other fields

Preview
I am a total access newbie when it comes to designing a database. I have managed to create a simple web database for project management but have run into a snag.

I want to have a field (field 3) auto-populate based on what is entered into two other fields (field 1 & field 2).

Field 1 is a date field (when a presentation is due). Field 2 is a yes/no checkbox (if checked, it means no presentation is necessary). Field 3 would be a calculated text field (?) because text cannot be entered into Field 1.

If field 1 is null and field 2 is checked, then I want "NA" to auto populate into field 3. However, if field 1 is null and field 2 is not checked, I want "TBD" to auto populate into field 3. If field 1 is not null, then I want field 3 to be null