Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Limit to list and default for combobox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Billy B - 28 May 2008 02:55 GMT
I have a combo box on form. The source data comes a table. The combo box
(cboListRet) limit to list property is set to true. My question is it
possible to set the default to "Unknown" if that value is in the table? I
have tried If statements and put unknown in the default property and I get an
error message: "The value you entered is not valid in this field" when I
click on the Tab control the combo box is located.

Thank you for any help.
Linq Adams - 28 May 2008 03:41 GMT
What is the datatype of the field you're trying to enter "Unknown" into?

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Billy B - 28 May 2008 05:20 GMT
The Store table has two columns, an StoreID and the StoreName. The combo box
column looks up the store name in the store table and returns the store name
to the combo box but column 1 is the bound column (StoreID). The StoreID
field in tblPlants is a numeric field and the foreign key to the StoreID in
tblStore.

What I am doing is adding a new record. When the user views this field, I
would like Unknown to be displayed (StoreID = 0, (Numeric) StoreName ="
Unknown"). As mentioned before, this is entry already in tblStore.

> What is the datatype of the field you're trying to enter "Unknown" into?
Jason - 28 May 2008 09:07 GMT
You can't set a string value for a numeric field (assuming StoreID is a
number). Even though text is displayed it is the numeric value that is
stored and then shows the text from the bound table of the combo box. You
need a record in the table where STOREID = 0 and STORENAME = "unknown". Make
the field's default value = 0.
> The Store table has two columns, an StoreID and the StoreName. The combo box
> column looks up the store name in the store table and returns the store name
[quoted text clipped - 7 lines]
>
> > What is the datatype of the field you're trying to enter "Unknown" into?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.