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 / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

What am I doing wrong?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ayo - 10 Jan 2008 21:43 GMT
I know something is wrong with this select statement, but I don't know what
it is. Please help. Thank you.

Select [Inscope Table].[Date Aproved by GM PM for Invoicing],[Inscope
Table].[AT&T Extended Price] from [Inscope Table] where [Inscope Table].[Date
Aproved by GM PM for Invoicing]<>"" and [AT&T Extended Price]<>0
Wayne-I-M - 10 Jan 2008 21:59 GMT
Try

SELECT [Inscope Table].[Date Aproved by GM PM for Invoicing], [Inscope
Table].[AT&T Extended Price]
FROM [Inscope Table]
WHERE ((Not ([Inscope Table].[Date Aproved by GM PM for Invoicing]) Is Null)
AND (([Inscope Table].[AT&T Extended Price])<>0));

Or

SELECT [Inscope Table].[Date Aproved by GM PM for Invoicing], [Inscope
Table].[AT&T Extended Price]
FROM [Inscope Table]
WHERE ((([Inscope Table].[Date Aproved by GM PM for Invoicing]) Not Like "")
AND (([Inscope Table].[AT&T Extended Price])<>0));

Signature

Wayne
Manchester, England.

> I know something is wrong with this select statement, but I don't know what
> it is. Please help. Thank you.
>
> Select [Inscope Table].[Date Aproved by GM PM for Invoicing],[Inscope
> Table].[AT&T Extended Price] from [Inscope Table] where [Inscope Table].[Date
> Aproved by GM PM for Invoicing]<>"" and [AT&T Extended Price]<>0
Ayo - 10 Jan 2008 22:21 GMT
Thanks Wayne

> Try
>
[quoted text clipped - 18 lines]
> > Table].[AT&T Extended Price] from [Inscope Table] where [Inscope Table].[Date
> > Aproved by GM PM for Invoicing]<>"" and [AT&T Extended Price]<>0
Ayo - 10 Jan 2008 22:40 GMT
Do you have any idea how to format a combobox, or textbox, in code. For
instance I am try to format a combobox, that normally takes a "Number", to
accept a text. How do I go about doing that?

> Try
>
[quoted text clipped - 18 lines]
> > Table].[AT&T Extended Price] from [Inscope Table] where [Inscope Table].[Date
> > Aproved by GM PM for Invoicing]<>"" and [AT&T Extended Price]<>0
Wayne-I-M - 11 Jan 2008 08:00 GMT
Nope - lost me on that one.  It can be done but I can't see your application
so I can't work out why you would want to.

The bound field (table or query) in a combo should (most of the time) be the
primary field - which is (most of the time) an atuonumber or some other
unique set of data.

You don't need to " code " the combo.  You could use a base query for the
combo to convert a number to text and have his isplayed to a user but this
would not affect the bound column.

If you work out what you're trying to get and post another question with
informtion someone will give you an answer.  But I would play around with a
base query for the combo to convert number formats to text and use this as
the "displayed" column in the combo 1st.
You can either use a module to do this in the form or a simple "format" in
the comb's query (using a calculated column) eg. Format( NumberHere, "0.0" )
or Format( NumberHere, "000" ) or Format( NumberHere, "£#,##0.00")     etc,
etc, etc

Signature

Wayne
Manchester, England.

> Do you have any idea how to format a combobox, or textbox, in code. For
> instance I am try to format a combobox, that normally takes a "Number", to
[quoted text clipped - 22 lines]
> > > Table].[AT&T Extended Price] from [Inscope Table] where [Inscope Table].[Date
> > > Aproved by GM PM for Invoicing]<>"" and [AT&T Extended Price]<>0
Pat Hartman - 11 Jan 2008 15:20 GMT
Wayne gave you the answer but he didn't explain the problem.

"" is a zero-length-string, it is not the same thing as Null.
Dates are numeric fields and numeric fields are not strings.  Therefore, use
Null when looking for "empty" numeric fields.  You should also be aware that
depending on how you define text fields, you may end up with ZLS in them as
well as Nulls and so unless you specifically prohibit ZLS from your text
fields, you need to consider both values when looking for "empty" string
fields.

Where MyDate Is Null

Where MyTextField & "" = ""  <------ this is a little trick that turns a
null field into a ZLS so you can do a single compare rather than two
compares.

>I know something is wrong with this select statement, but I don't know what
> it is. Please help. Thank you.
[quoted text clipped - 3 lines]
> Table].[Date
> Aproved by GM PM for Invoicing]<>"" and [AT&T Extended Price]<>0
 
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



©2009 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.