Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox can not have null value 2

Status
Not open for further replies.

Mr2006

Technical User
Jun 21, 2006
80
US
Hi All,

I have a projectsub table that have a lookup combobox filed that the properity of this filed is set to required.

In the subform for this table (datasheet), I want to make sure that this filed can not be a null when users create any record. I set the filed in the table (required). But it still allow user to leave it blank.
The
The row source for this filed is

SELECT TypeProject_tbl.ProjectTypeID, TypeProject_tbl.ProjectType
FROM TypeProject_tbl;

row source: long integer



Thanks


 
Are you sure you've removed the default value of 0?

Ed Metcalfe.

Please do not feed the trolls.....
 
Work on the English. I guess you want the rowsource of the combobox not to show any nulls. Add a where condition to the SQL, such as:
SELECT TypeProject_tbl.ProjectTypeID, TypeProject_tbl.ProjectType
FROM TypeProject_tbl
WHERE ProjectTypeID is not null;

And set the Limit To List property to YES.
 
Hmmm.... I thought I'd understood this question. Possibly not!

Ed Metcalfe.

Please do not feed the trolls.....
 
I'd enforce referential integrity in the relationships window.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you so much for all the valuable solutions. I had Zero as a default. Now, is there way to change the system message to meaningful one?

I want a message to appear to user when they leave the field blank "You need to specify the project type to move to the next field.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top