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 / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Make Table from Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 15 Nov 2005 23:58 GMT
Hi,

When I create "iif statement" before making a table.   The field has text
and size of 255 but I want to make it into "number and size of 8" instead of
"Text and size of 255".

Your help would be much appreciated.

Example:  IIf([Code]<>[IDNumber],[CodeName])

The field name "Example" has text and size of 255 after making the table.
Is there a way to set Example that has number and size of 8?

Thanks
John Vinson - 16 Nov 2005 01:49 GMT
>Hi,
>
[quoted text clipped - 10 lines]
>
>Thanks

Is the field CodeName in fact numeric? What does the table contain?

You can coerce the IIF to return a Long Integer:

Example: CLng(IIF([Code] <> [IDNumber], [CodeName], "0"))

Your IIF should have three arguments: the expression, the value to be
returned if the expression is true, and the value to return if it is
false. What should Example be set to if IDNumber *IS* equal to Code?

                 John W. Vinson[MVP]    
Van T. Dinh - 16 Nov 2005 01:53 GMT
If the Text can *always* be converted to numeric value, use CLng() to
convert the Text value to a Long value.

You can use the function IsNumeric() to check whether the Text value can be
converted to a numeric value.

Signature

HTH
Van T. Dinh
MVP (Access)

> Hi,
>
[quoted text clipped - 10 lines]
>
> Thanks
 
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.