Querying an access 2000 db using VB 
Author Message
 Querying an access 2000 db using VB

Hi,

I have a problem, I need to query a Access 2000 DB using VB.  Here is a
rundown on what I need to accomplish.

The table is called MEMBERS, I need to get the MEMBERAUTO, SALUTATION,
MEMBERFIRST and MEMBERLAST fields.  The form needs to query the MEMBERAUTO
field based on a TextBox on the form (called INPUT).  The result goes to a
TextBox called OUTPUT and is a concatenation of fields (Mr Joe Bloggs).

Any help would be really really appreciated, I have no idea at the moment.

Thanks

Lucas



Thu, 18 Mar 2004 12:50:18 GMT  
 Querying an access 2000 db using VB
Lucas wrote

Quote:
> The table is called MEMBERS, I need to get the MEMBERAUTO, SALUTATION,
> MEMBERFIRST and MEMBERLAST fields.  The form needs to query the
> MEMBERAUTO field based on a TextBox on the form (called INPUT).  The
> result goes to a TextBox called OUTPUT and is a concatenation of
> fields (Mr Joe Bloggs).

You haven't mentioned whether you're using DAO or ADO, but with DAO, you'd
use something like this (air code):

Dim rs as DAO.Recordset

        set rs = db.OpenRecordset( _
                "Select MemberAuto, Saluatation, MemberFirst, MemberLast" _
                & " from SomeTable where someFld=" & Forms!frmMyForm!txtMyInput
        if not (rs.EOF and rs.BOF) then
                forms!frmMyForm!txtOutput = rs!SomeFld
        end if
        rs.Close
        set rs = Nothing

  -- Dev



Fri, 19 Mar 2004 08:29:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Converting Access 97 DB to 2000 using VB

2. display chinese using DAO 3.6/VB6 in accessing Access 2000 DB.

3. Can't access db in Access 2000 using ADO

4. Convert Access 97 db to Access 2000 db in VB6

5. Accessing encrypted data in Access 2000 DB via VB

6. problems opening access 2000 db using vb5

7. Multiuser Access 2000 DB using ADO - Locking Problem

8. Using DAO to create pass thru queries in access 2000 - references problem

9. Using DAO to create pass thru queries in access 2000 - references problem

10. Cannot view queries created using ADOX in Access 2000 interface

11. Use Access 2000 DB in vb

12. Opening Access (2000) DB with VB 6

 

 
Powered by phpBB® Forum Software