A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I tell to recordset that I want all True-fields?



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2006, 07:37 AM posted to microsoft.public.access.forms
hanski
external usenet poster
 
Posts: 60
Default How do I tell to recordset that I want all True-fields?

Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
....
....

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu

  #2  
Old December 7th, 2006, 07:42 AM posted to microsoft.public.access.forms
Baz
external usenet poster
 
Posts: 380
Default How do I tell to recordset that I want all True-fields?

select * from MyDatabase where Field1 0

"hanski" wrote in message
oups.com...
Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
...
...

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu



  #3  
Old December 7th, 2006, 07:44 AM posted to microsoft.public.access.forms
Baz
external usenet poster
 
Posts: 380
Default How do I tell to recordset that I want all True-fields?

There's no need to ask the same question three times in three minutes.

"hanski" wrote in message
oups.com...
Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
...
...

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu



  #4  
Old December 7th, 2006, 08:25 AM posted to microsoft.public.access.forms
hanski
external usenet poster
 
Posts: 60
Default How do I tell to recordset that I want all True-fields?

I send my question 3 times and every time came response: Server error.
Can't send your message. Try later again". I was going to send my
question fourt time but then I noticed, it was there. Not my fault.


Baz kirjoitti:

There's no need to ask the same question three times in three minutes.

"hanski" wrote in message
oups.com...
Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
...
...

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu


  #5  
Old December 7th, 2006, 08:59 AM posted to microsoft.public.access.forms
hanski
external usenet poster
 
Posts: 60
Default How do I tell to recordset that I want all True-fields?

Thanks a lot Baz!


hanski


Baz kirjoitti:

select * from MyDatabase where Field1 0

"hanski" wrote in message
oups.com...
Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
...
...

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu


  #6  
Old December 7th, 2006, 09:40 AM posted to microsoft.public.access.forms
hanski
external usenet poster
 
Posts: 60
Default How do I tell to recordset that I want all True-fields?

One more problem!

select * from MyDatabase where Field1 0, gives me really every true-
statements, but when I want False-statements select * from MyDatabase
where Field1 -1 won't work! How do you do it when you want
false-statements?




Baz kirjoitti:

select * from MyDatabase where Field1 0

"hanski" wrote in message
oups.com...
Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
...
...

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu


  #7  
Old December 7th, 2006, 11:58 AM posted to microsoft.public.access.forms
Sean
external usenet poster
 
Posts: 13
Default How do I tell to recordset that I want all True-fields?

Surely,

select * from MyDatabase where Field1 = 0

"hanski" wrote in message
oups.com...
One more problem!

select * from MyDatabase where Field1 0, gives me really every true-
statements, but when I want False-statements select * from MyDatabase
where Field1 -1 won't work! How do you do it when you want
false-statements?




Baz kirjoitti:

select * from MyDatabase where Field1 0

"hanski" wrote in message
oups.com...
Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
...
...

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.