Search results

  1. P

    Auto populate listbox with textbox

    You don't recommend people do what? And with the .Text Property, do you meansqlTraining = "SELECT DISTINCT [Training] FROM QryTrainedEmployees WHERE [Training] LIKE "" * " & Me.txtSearch.Text & " * "" ORDER BY [Training]" Because I tried with that but it is still not working? Thank you
  2. P

    Auto populate listbox with textbox

    Hello Guys, I am trying to get a listBox to auto-populate or change as I am typing in the textbox. but I type all my selections go away. I placed the code under _Change event AND _KeyPress but nothing. Am I doing this right? I went online to research some codes but I want to believe it is not...
  3. P

    Solved Syntax Error

    Yes I understand it and it worked. So, thank you very much
  4. P

    Solved Syntax Error

    I guess I am confuse as to where I assign the string? Because the following does not work either or do you mean I do not use the keyword "Return"? So like this? Function getTraining() As String Dim sqlTraining As String sqlTraining = "SELECT DISTINCT [Training] FROM QryTrainedEmployees...
  5. P

    Solved Syntax Error

    I put it as a parameter because I thought it was needed but if I dont want it do I do? Function getTraining() As String getTraining = "SELECT DISTINCT [Training] FROM QryTrainedEmployees ORDER BY [Training]" Return strTraining End Function Because that doesn't work either
  6. P

    Solved Syntax Error

    Hello Guys, I am trying to familiarize myself with Function in MS Access VBA. Does it not return strings. The following code give me an error message Function getTraining(strTraining As String) As String strTraining = "SELECT DISTINCT [Training] FROM QryTrainedEmployees ORDER BY [Training]"...
  7. P

    Solved SQL/Query <> not working

    Makes sense. Thank you for your help
  8. P

    Solved SQL/Query <> not working

    Yes, I tried JOIN and it worked. Thank you
  9. P

    Solved SQL/Query <> not working

    The LEFT JOIN worked. Thank you. I just saw that it was basically an unmatched query but I am still not understanding why "<>" never works
  10. P

    Solved SQL/Query <> not working

    I just thought about something. I am basically looking to return an unmatched query so I think plog is right because I used Join and it is working now. BUT I would still like to understand why "<>" seems not to work in this case? If I say give me records from QryA where QryA.field <> QryB.field...
  11. P

    Solved SQL/Query <> not working

    Hello guys, I noticed that "<>" has not been working for several of my queries in the query design view and the SQL View. Is there a reason why? I have 2 queries and I want records where the 2 states are not equal but it is returning all the states from one of the query Here is the SQL View code...
  12. P

    Solved Add a number after a Left()

    Ok Thank you
  13. P

    Solved Add a number after a Left()

    So I know how to create the previous the smit01 smit02 etc. But Can I also create something similar within VBA for an entry form? and my question is if yes? how do I use the Left() and the autonumber feature? so if I want to replace "smit" here with Left(string,4)
  14. P

    Solved Add a number after a Left()

    I wanted to use an autonumber but How do I concatenate it with my substring?
  15. P

    Solved Add a number after a Left()

    Hello Guys, I am trying to create an ID based on the first 4 characters of an input. However, I would like to add a number to it each time starting with 1. How can I do that? Here is what I have so far 'Get the new Provider name strNewProvider = InputBox("Please type a new Provider Name"...
  16. P

    Solved INSERT INTO/VBA

    Thank you so much. It was the space before VALUES, so I know to pay better attention to it. It now works. I really appreciate this.
  17. P

    Solved INSERT INTO/VBA

    It actually works with form AfterUpdate but it now giving me a syntax error. I don't see the error. when I step through it it shows me the correct value so could it be my ""? Change date is Date/Time and GrandToTal is currency? Private Sub Form_AfterUpdate() Dim strSQL As String strSQL...
  18. P

    Solved INSERT INTO/VBA

    Yes it is a calculated control. I just placed the code into the After Update of the [TotalPrice] but still nothing?
  19. P

    Solved INSERT INTO/VBA

    Hello Guys, I have a form with a textbox [txtGrandTotal], which accurately sums a totalPrice every time the form is saved. I am trying to insert that value into a table every time it is updated with the date. I have tried the code on the "After Update" and "Change" events of the textbox but...
  20. P

    Solved SQL/Recordset/Email

    You're a Genius. It works. Thank you so much! Here is the new working Code: Private Sub cmdEmail_Click() Dim db As DAO.Database Dim rs As DAO.Recordset Dim sqlStr As String Dim oApp As New Outlook.Application Dim oEmail As Outlook.MailItem Dim strBody As String 'Open the Recordset Set db =...
Back
Top Bottom