Search results

  1. B

    Like Operator

    The Code here is the whole code! See if this helps! Private Sub Command21_Click() Dim D As Database Dim T As Recordset Dim C As Boolean Dim Count As Integer Set D = CurrentDb() Set T = D.OpenRecordset("tblPartCodes") Count = 0 T.MoveFirst Do Until T.EOF = True If...
  2. B

    Like Operator

    Thanks for the reply!! Sorry but I must've put you off because my first post was actually wrong! It is the other way round I need the code. eg code = aaa and Me!txt = aaauuurrr. Ur code is exactly the same as mine except the other way round but mine still doesn't seem to work!
  3. B

    Like Operator

    Any other ideas Thanks for the reply but I don't think that is what I'm looking for! I think I've almost got what I want but I've just got quotes in the wrong place or missing brackets or something! Any more ideas??
  4. B

    Like Operator

    Another Clue!!!!! If Me!txt = any value then count is incremented but if Me!txt is blank then no matches are found. Just another clue!!
  5. B

    Like Operator

    Update This is the second attempt I've had which is closer to what I really want but it still isn't right! If (Me!txt Like T![code]&"*") = True Then Count = Count + 1 Any ideas?
  6. B

    Like Operator

    I'm trying to say in my code if the field in recordset T is like Me!txt* Then add 1 to count. eg. would be True if T![code] = aa and Me!txt = aabbcc My code is wrong and I'm not sure how to word the Me!txt* part. If ( T![code] Like Me!txt"*")= True Then Count = Count + 1 What's the...
  7. B

    Matching part of a variable with a list of codes

    Not always! It's sometimes codes like HP-A-1 but I don't see how it matters cos I search for parts like code"*" in a query and it's ok!
  8. B

    Matching part of a variable with a list of codes

    I have a form on which the user adds in the part details and then clicks a button to add this new part to the parts table. Each part starts with a certain code eg. HP-A = the code and HP-A-1001 = a part number based on this code. There are many other different codes. I have a table that...
  9. B

    reference subform control in query

    How can I reference a control on a subform in a query??
  10. B

    using like with a parameter

    PARAMETERS [Forms]![frmChoose]![txtcode] Text ( 255 ); SELECT [Product List].[Part Number], [Product List].[Short Description], [Product List].[Full Description], [Forms]![frmChoose]![txtcode] AS Expr1 FROM [Product List] WHERE ((([Product List].[Part Number]) Like...
  11. B

    Using Like with a parameter

    PARAMETERS [Forms]![frmChoose]![txtcode] Text ( 255 ); SELECT [Product List].[Part Number], [Product List].[Short Description], [Product List].[Full Description], [Forms]![frmChoose]![txtcode] AS Expr1 FROM [Product List] WHERE ((([Product List].[Part Number]) Like...
  12. B

    Referencing a specific list box column from a query

    I found that out thanks anyway. I think the problem might be with the Like "parameter*" part.
  13. B

    Referencing a specific list box column from a query

    worth a try worth a try but it didn't work either. anybody anymore ideas
  14. B

    Referencing a specific list box column from a query

    PARAMETERS [Forms]![frmChoose]![list].[Column(1)] Text ( 255 ); SELECT [Product List].[Part Number], [Product List].[Short Description], [Product List].[Full Description] FROM [Product List] WHERE ((([Product List].[Part Number]) Like " [Forms]![frmChoose]![list].[Column(1)]*")) ORDER BY...
  15. B

    Open form using right mouse button

    I am trying to open formB from form A by using formA's key press event. I want to do it using the right mouse button. I typed in the constant for this vbKeyRButton but it didn't work. However when I used vbKeyBack it worked. Why isn't it working for vbKeyRButton?
  16. B

    In Need Of Vb Tips

    IN MY DATABASE I HAVE ASSEMBLIES THAT ARE MADE UP OF VARIOUS PARTS. SOME OF THESE PARTS HOWEVER ARE ASSEMBLIES THEMSELVES. WHEN CREATING THESE PARTS I HAVE A CHECK BOX THAT IS CHECKED IF IT IS AN ASSEMBLY. WHAT I WANT TO HAPPEN IS THAT WHEN I OPEN AN ASSEMBLY AND DISPLAY ALL THE PARTS I WANT...
  17. B

    Simple problem for an experienced person to solve

    I have a form that displays a list of parts from the parts library table. beside each part is a button that when clicked starts a query that asks the user for the quantity of the part they need and then adds it to the separate parts list. However I want code in the button that checks whether...
  18. B

    Adding item numbers with an append query

    I have the following table in my database (shown with data that I want to be able to put in it using my query): *List ID Part No Item CU-1001 IV-R-1 1 CU-1001 HG-G-3 2 TU-1003 VN-N-2 1 TU-1003 FH-I-2 2 SH-1002 FH-I-2 1 I have a form with an edit box for List ID and part no. I have a...
  19. B

    Adding item numbers with an append query

    I have the following table in my database (shown with data that I want to be able to put in it using my query): *List ID Part No Item CU-1001 IV-R-1 1 CU-1001 HG-G-3 2 TU-1003 VN-N-2 1 TU-1003 FH-I-2 2 SH-1002...
  20. B

    Correct query not working on form

    I have an update query that works perfectly well on it's own but when I call it via a button on a form using openquery it doesn't update the table. I have checked that the names of the control referred to in the query are correct. Why is this???
Back
Top Bottom