Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by melaniews

  1. melaniews

    Or perhaps there is a better way

    Thank you so much. This has helped me tremendously. Melanie
  2. melaniews

    Or perhaps there is a better way

    Wow, that really looks good! One question, where you have the strSQL = "SELECT ....etc. -- as you mentioned you shortened the names. I have no control over the table names and field names. Should I change those back to the orginal lengthy monsters or does this work just like it is? Oh...
  3. melaniews

    Or perhaps there is a better way

    Thanks -- I really didn't know what it all meant. Anyway, I've changed my code as you suggested. I'm still getting the same error. "A RunSQL actions requires an argument consisting of an SQL statement." I cannot understand this. It appears to me that the argument is there. My exact...
  4. melaniews

    Or perhaps there is a better way

    Oh, I see what you mean. This code is higher up in the sub. It captures results from combo boxes on the form -- and I thought it was putting them into the "where". Dim strWhere As String 'String variable to store where clause If Len(Me.cboIncome & "") > 0 Then...
  5. melaniews

    Or perhaps there is a better way

    Thanks Cajun, I don't know what is incomplete in the Where clause. The Where clause is commented out in the OpenForm statement. It worked well there as a filter, but I really need it saved as criteria in a query. I changed it a little. I did DoCmd.RunSQL "I put the SQL statement here...
  6. melaniews

    Or perhaps there is a better way

    OK, I got all that -- thank you very much. I'm getting another error now. "A RunSQL actions requires an argument consisting of an SQL statement." Here's what the code looks like now..... Dim strSQL As String Dim stDocName As String stDocName = strSQL strSQL =...
  7. melaniews

    Or perhaps there is a better way

    I'm sure the concept is valid. I'm trying to pass the results of multiple combo boxes to a SQL string to be used in a query. Here's what I have so far. The message I get is "can't find the object 'stDocName'" There may be issues beyond this. But I haven't gotten past this error...
  8. melaniews

    Trying to save a filter as query

    This is what I have so far (in the unload event). My problem is the saveasquery command prompts for a filename and I can't figure out how or where to put the text and click the OK button. It will also prompt me that the file already exists and do I want to save anyway. Also I'm not sure of how...
  9. melaniews

    adding criteria to selectquery form Combobox

    I found an answer that worked for me. It's fantastic and quite simple to use. Perhaps it will work for you. faq702-3619 Melanie
  10. melaniews

    adding criteria to selectquery form Combobox

    Me too -- me too. Same problem -- looking for same solution -- VB code Melanie
  11. melaniews

    help with getting code to work

    Thanks Cajun It works great! and is useful in other areas as well. Thanks, Melanie
  12. melaniews

    help with getting code to work

    I'm trying to make it easy for a user to select all in a listbox. This code works great for clearing all selections (lboTPromoID.Selected(varItem) = False). Why doesn't it work to select all when (varItem) = True? Also, how can I accomplish my goal here? Private Sub cmdSelectAll_Click() On...
  13. melaniews

    Code is close but not correct

    Oh yes, thank you. I was missing the vbCritical part and the exit sub part and it just kept running the text export even when I clicked cancel. It works great now. I even added a docmd.cancelevent to it to make it return to the previous state. Thanks so much. Melanie
  14. melaniews

    Code is close but not correct

    Okay, I've tried several different approaches. I tried to execute a keyboard command to stop the save. I tried an error routine to just get out. And I tried to jump forward in the code. I've have come up with a big 0 on getting anything to work. I'm sure this is due to my inexperience with VB...
  15. melaniews

    Code is close but not correct

    Okay, so that's an IF, THEN, ELSEIF kind of thing I think. But where does it go in the code? TIA, Melanie

Part and Inventory Search

Back
Top