need help opening a two field index with VB6 using access 2000 
Author Message
 need help opening a two field index with VB6 using access 2000

I need to set the index for rstmachine to 2 fields. I can't get it to work
by joining the two fields with "and" or a comma. Any help would be
appreciated.

Thank You,
David Adam

Set rstmachine = New ADODB.Recordset
rstmachine.CursorLocation = adUseServer
rstmachine.Open "machines", _
           "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\program files\parts\test.mdb;" & _
             "user id=admin;password=;", _
             adOpenKeyset, adLockOptimistic, adCmdTableDirect

rstmachine.Index = "mach_numb" And "model_numb"



Fri, 28 Feb 2003 10:48:29 GMT  
 need help opening a two field index with VB6 using access 2000
You need to define the 2-field index in Access and name it there. For
instance, you could define the index and name it "mach_model." It would be
defined as having the fields, mach_numb and model_numb.

Change the following line,

Quote:
> rstmachine.Index = "mach_numb" And "model_numb"
to:
> rstmachine.Index = "mach_mode"



Quote:
> I need to set the index for rstmachine to 2 fields. I can't get it to work
> by joining the two fields with "and" or a comma. Any help would be
> appreciated.

> Thank You,
> David Adam

> Set rstmachine = New ADODB.Recordset
> rstmachine.CursorLocation = adUseServer
> rstmachine.Open "machines", _
>            "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>            "Data Source=c:\program files\parts\test.mdb;" & _
>              "user id=admin;password=;", _
>              adOpenKeyset, adLockOptimistic, adCmdTableDirect

> rstmachine.Index = "mach_numb" And "model_numb"



Mon, 03 Mar 2003 03:00:00 GMT  
 need help opening a two field index with VB6 using access 2000
Thank you for your help.
David Adam


Quote:
> You need to define the 2-field index in Access and name it there. For
> instance, you could define the index and name it "mach_model." It would be
> defined as having the fields, mach_numb and model_numb.

> Change the following line,
> > rstmachine.Index = "mach_numb" And "model_numb"
> to:
> > rstmachine.Index = "mach_mode"



> > I need to set the index for rstmachine to 2 fields. I can't get it to
work
> > by joining the two fields with "and" or a comma. Any help would be
> > appreciated.

> > Thank You,
> > David Adam

> > Set rstmachine = New ADODB.Recordset
> > rstmachine.CursorLocation = adUseServer
> > rstmachine.Open "machines", _
> >            "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> >            "Data Source=c:\program files\parts\test.mdb;" & _
> >              "user id=admin;password=;", _
> >              adOpenKeyset, adLockOptimistic, adCmdTableDirect

> > rstmachine.Index = "mach_numb" And "model_numb"



Wed, 05 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. nedd help using index in VB6 and access 2000

2. Need Help Manipulating Excel 2000 from Access 2000 using VBA

3. Newbie: Needs Help on Using Access Picture (OLE) Fields in VB6.0 Form

4. Help Opening Access 2000 from VB6

5. Need help with VB6 and Access 2000 problem...

6. Need Help with VB6 and ACCESS 2000

7. Two Access 2000 db's on one VB6 form

8. I can't add a key (index) on two fields using VB

9. Adding Field to Access db - need to make indexed property of field No Duplicates

10. Create Index using SQL in Access 2000 Table

11. Create Index using SQL in Access 2000 Table

12. Create Index using SQL in Access 2000 Table

 

 
Powered by phpBB® Forum Software