Results 1 to 5 of 5

Thread: easy database Question

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    WALES UK
    Posts
    31
    You gotta help me Im Going mental!!

    I need to search through a database for a colour but if its not in the first Coloumn I need VB to Check The other 3 can anyone help

    What I created is below!!!

    Stop laughing!!

    Private Sub Command4_Click()
    prompt$ = "Enter the full (complete) Carpet Colour."

    SearchStr$ = InputBox(prompt$, "Carpet Search")
    Data2.Recordset.Index = "colour 1"
    Data2.Recordset.Seek "=", SearchStr$
    If Data2.Recordset.NoMatch Then

    Data2.Recordset.Index = "Colour 2"
    Data2.Recordset.Seek "=", SearchStr$
    If Data2.Recordset.NoMatch Then

    Data2.Recordset.Index = "Colour 3"
    Data2.Recordset.Seek "=", SearchStr$
    If Data2.Recordset.NoMatch Then

    Data2.Recordset.Index = "Colour 4"
    Data2.Recordset.Seek "=", SearchStr$
    If Data2.Recordset.NoMatch Then


    Data2.Recordset.MoveFirst
    End If

    End If
    End If
    End If

    End Sub




  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658

    Wink

    stop bloody posting the same question.

    Have you no patience that man.

    [Edited by Iain17 on 04-12-2000 at 04:07 PM]
    Iain, thats with an i by the way!

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Lightbulb

    perhaps he's trying to upgrade himself to "Member" status
    Mark
    -------------------

  4. #4
    Lively Member brjames's Avatar
    Join Date
    Jan 2000
    Location
    Tenby, Wales, UK
    Posts
    121

    Hear me now....

    RHYS,

    This ****ing project is driving me chicken oriental. I've managed to get a word document to occur onto a form but i need to edit it (add new invoice numbers) and then print it out.


    The Boy Ben

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    WALES UK
    Posts
    31
    Ben, see the code above...what do u think is wrong with it? when ever I run it it says that "Colour 1" is not an Index but this code works fine for the carpet look up

    VB HAS SERIOUS AND DEEP ROOTED ISSUES!!!!!

    Im going to get some stella and have another look at it then gboy

    Rhys

    PS
    I have no ideas 4 your little problem there!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width