Fields missing from AccessDB after search in VB6 
Author Message
 Fields missing from AccessDB after search in VB6

Hello, here's a newby-question...

I am working on a small application connected to an Access2000 database in
VB6. The data-control works fine, I can move through all fields. The problem
is: after I do a search on, let's say, "Name" I get a match and can move
(using the data-control) through the matching fields and some other ones,
but other fields are missing!

When I restart the application everything is back to normal and all fields
are back.

I can't figure out why I see some fields after a search (more then only the
matches), and not the whole database.

Any help on this would be appriciated.

Mark



Thu, 23 Oct 2003 04:31:49 GMT  
 Fields missing from AccessDB after search in VB6
It might help if we had a look at your code. What kind of a "search" are you
doing? Are you using a SQL select statement, or something else?

Jim


Quote:
> Hello, here's a newby-question...

> I am working on a small application connected to an Access2000 database in
> VB6. The data-control works fine, I can move through all fields. The
problem
> is: after I do a search on, let's say, "Name" I get a match and can move
> (using the data-control) through the matching fields and some other ones,
> but other fields are missing!

> When I restart the application everything is back to normal and all fields
> are back.

> I can't figure out why I see some fields after a search (more then only
the
> matches), and not the whole database.

> Any help on this would be appriciated.

> Mark



Thu, 23 Oct 2003 07:18:19 GMT  
 Fields missing from AccessDB after search in VB6
Ok, I have the search-button code here. I hope this gives you an idea...

Mark

    zoekveld = Combo1.Text

    prompt$ = zoekveld
    searchstr$ = InputBox(prompt$, zoekveld)
    lengte = Len(searchstr$)

    Data1.Recordset.Index = zoekveld
    Data1.Recordset.Seek "=", searchstr$
        If Data1.Recordset.NoMatch Then
            Data1.Recordset.MoveFirst
        End If



Thu, 23 Oct 2003 15:28:16 GMT  
 Fields missing from AccessDB after search in VB6
I have no trouble with mine, but then I don't have your particular database
or application either.

Some things to look for: Make sure you project has a reference to DAO 3.6.
Access 2000 requires this. Make sure the field referenced by zoekveld is an
indexed field. It doesn't have to be unique, but it does have to be indexed.
Make sure that the recordset type property of your data control is set to
0-Table.

You have probably done all this or it wouldn't work at all.

I hope that gets you a little closer.

Jim


Quote:
> Ok, I have the search-button code here. I hope this gives you an idea...

> Mark

>     zoekveld = Combo1.Text

>     prompt$ = zoekveld
>     searchstr$ = InputBox(prompt$, zoekveld)
>     lengte = Len(searchstr$)

>     Data1.Recordset.Index = zoekveld
>     Data1.Recordset.Seek "=", searchstr$
>         If Data1.Recordset.NoMatch Then
>             Data1.Recordset.MoveFirst
>         End If



Fri, 24 Oct 2003 01:33:24 GMT  
 Fields missing from AccessDB after search in VB6
Hi James,

I did everything except the DAO 3.6 thing. Can you tell me how to make a
reference to it?

Thanks a lot!

Mark


Quote:
> I have no trouble with mine, but then I don't have your particular
database
> or application either.

> Some things to look for: Make sure you project has a reference to DAO 3.6.
> Access 2000 requires this. Make sure the field referenced by zoekveld is
an
> indexed field. It doesn't have to be unique, but it does have to be
indexed.
> Make sure that the recordset type property of your data control is set to
> 0-Table.

> You have probably done all this or it wouldn't work at all.

> I hope that gets you a little closer.

> Jim



> > Ok, I have the search-button code here. I hope this gives you an idea...

> > Mark

> >     zoekveld = Combo1.Text

> >     prompt$ = zoekveld
> >     searchstr$ = InputBox(prompt$, zoekveld)
> >     lengte = Len(searchstr$)

> >     Data1.Recordset.Index = zoekveld
> >     Data1.Recordset.Seek "=", searchstr$
> >         If Data1.Recordset.NoMatch Then
> >             Data1.Recordset.MoveFirst
> >         End If



Fri, 24 Oct 2003 01:31:54 GMT  
 Fields missing from AccessDB after search in VB6
On your VB menu bar, select Projects>References then scroll down and select
Microsoft DAO 3.6 Object Library. However, it may already be set by virtue
of your inserting a data control and linking it to a MS Access 2000
database.

Microsoft Access 2000 does not support DAO 3.5 or earlier, which is why I
suspect you already have DAO 3.6 referenced in your project. It won't run at
all otherwise. So you may not have to scroll at all. It should already be
checked. If not, find it then check it and click the "OK" button.

Jim

P.S. When you get all this figured out, it will be time to move on to ADO
;-)


Quote:
> Hi James,

> I did everything except the DAO 3.6 thing. Can you tell me how to make a
> reference to it?

> Thanks a lot!

> Mark



> > I have no trouble with mine, but then I don't have your particular
> database
> > or application either.

> > Some things to look for: Make sure you project has a reference to DAO
3.6.
> > Access 2000 requires this. Make sure the field referenced by zoekveld is
> an
> > indexed field. It doesn't have to be unique, but it does have to be
> indexed.
> > Make sure that the recordset type property of your data control is set
to
> > 0-Table.

> > You have probably done all this or it wouldn't work at all.

> > I hope that gets you a little closer.

> > Jim

<<snip>>


Fri, 24 Oct 2003 04:08:38 GMT  
 Fields missing from AccessDB after search in VB6
Ok, will try that... Whatever happens... I am learning a lot!!

Thanks again!

Mark


Quote:
> On your VB menu bar, select Projects>References then scroll down and
select
> Microsoft DAO 3.6 Object Library. However, it may already be set by virtue
> of your inserting a data control and linking it to a MS Access 2000
> database.

> Microsoft Access 2000 does not support DAO 3.5 or earlier, which is why I
> suspect you already have DAO 3.6 referenced in your project. It won't run
at
> all otherwise. So you may not have to scroll at all. It should already be
> checked. If not, find it then check it and click the "OK" button.

> Jim

> P.S. When you get all this figured out, it will be time to move on to ADO
> ;-)



> > Hi James,

> > I did everything except the DAO 3.6 thing. Can you tell me how to make a
> > reference to it?

> > Thanks a lot!

> > Mark



> > > I have no trouble with mine, but then I don't have your particular
> > database
> > > or application either.

> > > Some things to look for: Make sure you project has a reference to DAO
> 3.6.
> > > Access 2000 requires this. Make sure the field referenced by zoekveld
is
> > an
> > > indexed field. It doesn't have to be unique, but it does have to be
> > indexed.
> > > Make sure that the recordset type property of your data control is set
> to
> > > 0-Table.

> > > You have probably done all this or it wouldn't work at all.

> > > I hope that gets you a little closer.

> > > Jim

> <<snip>>



Fri, 24 Oct 2003 05:08:08 GMT  
 Fields missing from AccessDB after search in VB6

Quote:

> P.S. When you get all this figured out, it will be time to move on to ADO
> ;-)

Pah. ADO, the data-access library for the foreseeable future, is already
dead. Anyway, by the time DAO really runs out of steam, ADO's successor,
ADO.NyET, will probably also be doomed.

--

WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Fri, 24 Oct 2003 13:37:10 GMT  
 Fields missing from AccessDB after search in VB6
That was my point. By the time you get one technology figured out so you can
get something done, you are already two generations behind. Somebody has to
put a leash on the marketing types.

Jim




Quote:

> > P.S. When you get all this figured out, it will be time to move on to
ADO
> > ;-)

> Pah. ADO, the data-access library for the foreseeable future, is already
> dead. Anyway, by the time DAO really runs out of steam, ADO's successor,
> ADO.NyET, will probably also be doomed.

> --


<http://www.xenu.net/>
Quote:
> WARNING: I cannot be held responsible for the above        They're
coming  to
> because  my cats have  apparently  learned to type.        take me away,
ha ha!



Sat, 25 Oct 2003 00:45:44 GMT  
 Fields missing from AccessDB after search in VB6
Yes!




Quote:

> > P.S. When you get all this figured out, it will be time to move on to
ADO
> > ;-)

> Pah. ADO, the data-access library for the foreseeable future, is already
> dead. Anyway, by the time DAO really runs out of steam, ADO's successor,
> ADO.NyET, will probably also be doomed.

> --


<http://www.xenu.net/>
Quote:
> WARNING: I cannot be held responsible for the above        They're
coming  to
> because  my cats have  apparently  learned to type.        take me away,
ha ha!



Sat, 25 Oct 2003 07:22:28 GMT  
 Fields missing from AccessDB after search in VB6

Quote:

> That was my point. By the time you get one technology figured out so you can
> get something done, you are already two generations behind. Somebody has to
> put a leash on the marketing types.

I dunno, I'm still puttering along in DAO, where I can actually join
tables from different databases, search a resultset on more than one
field at a time, and keep local temporary data on the client machine
instead of having to clog up the servers with temporary tables. Does
that make me a Luddite?

--

WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sun, 26 Oct 2003 16:18:54 GMT  
 Fields missing from AccessDB after search in VB6
No, but I have found that not paying serious attention to the incremental
changes (dare I call them advances?) can result in a serious learning curve
problem later on.

I started fooling around with VB3 then experienced a hiatus while working in
a totally different environment for a few years. When I cam back to VB6 it
was a completely different product. There were enough similarities to make
me think on the surface I knew what I was doing, but I didn't. Classes,
object models, ADO, OLEDB, and all the other stuff were completely new,
foreign, and a bit frightening.

<rant>Gotta keep up or slip off into the dark to die. Still, many of the
"advances" are marketing driven rather than demand driven. They are trotted
out as a method of pepetuating the revenue stream. And that is tough on
users. Old products are no longer supported. Newer, more expensive equipment
must be purchased to run the bigger, hungrier beasts. And the investment in
technical education becomes a bottomless pit to which older programmers must
be sacrificed thereby wasting solid business knowledge.</rant>

Sorry, I lost it there for a moment.

Jim




Quote:

> > That was my point. By the time you get one technology figured out so you
can
> > get something done, you are already two generations behind. Somebody has
to
> > put a leash on the marketing types.

> I dunno, I'm still puttering along in DAO, where I can actually join
> tables from different databases, search a resultset on more than one
> field at a time, and keep local temporary data on the client machine
> instead of having to clog up the servers with temporary tables. Does
> that make me a Luddite?

> --


<http://www.xenu.net/>
Quote:
> WARNING: I cannot be held responsible for the above        They're
coming  to
> because  my cats have  apparently  learned to type.        take me away,
ha ha!



Sun, 26 Oct 2003 22:29:35 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. VB6(SP5): missing field-values

2. AccessDB and Object OLE in VB6

3. VB6 Package+Deployment w/AccessDB

4. Tab to search field on search engines

5. Fields, how to search for a specific type of field

6. Getting records that are missing info in one or more fields

7. missing value in a fields.Item causes Mapi runtime error

8. From field missing with custom form

9. Sender field missing in email object

10. Userfrom, protect-unprotect, form fields missing

11. missing form fields

12. form fields missing

 

 
Powered by phpBB® Forum Software