Recent content by abhisheknag89

  1. A

    Storing values from a Query in a variable

    Yup, I changed the return type to string and concatenated and that does the trick. Hehe yeah hopefully this database doesn't get too big and flood these reports.
  2. A

    Storing values from a Query in a variable

    Surprise surprise here I am again. Any ideas on how I can return multiple values from the function? Right now it looks like: functionname() functionname=value Which of course returns 'value'. How can I make it return multiple values?
  3. A

    Storing values from a Query in a variable

    Eureka, it works! I didn't know it was a 2-dimensional array! VbaInet strikes again. Yeah, if I had a lot of records it could get messy but I'll largely be limited to just a few. Thanks again! Hopefully I won't need to bother you with this again.
  4. A

    Storing values from a Query in a variable

    I have a query whose results i want to show on a report in a textbox using a function. I figured the best way would be to store the values I want into an array so that I can pass the array values I want back to the textbox on the report. Is there a better way to do this? I tried getrows. Based...
  5. A

    Storing values from a Query in a variable

    Hey all ! I had a little problem. I have a query that has 2 fields in it and 6 records. I want to create something like an array ideally that stores the 6 values from one of the fields. I tried this: Set rst = dbs.OpenRecordset("testquery") testval = rst3.Fields("minofmin breaker rating")...
  6. A

    DESPERATE: Need help with SQL!

    The code I'm using is: DoCmd.RunSQL "UPDATE [Dummy Table] SET [Line Rating] = Enter_Rating_Value WHERE [Sub Station] = Enter_substation_name" Which prompts the user to enter the values for Line Rating and then Sub Station. Zero length string, eh. I guess if I know where it is stored I can set...
  7. A

    DESPERATE: Need help with SQL!

    Hahah you're right. Run-Time error '3270'" Reserved Error I guess access doesn't really know how to proceed if the user chooses to cancel.
  8. A

    DESPERATE: Need help with SQL!

    Yup. By the way: when I prompt the user to enter the parameter value, if the user clicks cancel then my program runs into an error. Can I assign an event to the "cancel" button to, say, close the report?
  9. A

    DESPERATE: Need help with SQL!

    I do believe bob is right. I never had any issues with grabbing values from textboxes when i was working with forms, but I guess reports really don't have that functionality. Thanks so much all of you for your time, wisdom and patience! I think I'll have to settle for having the user be...
  10. A

    DESPERATE: Need help with SQL!

    Sorry for the confusion guys. I'm working with a Report. On this Report there is a textbox and a button. When the button is clicked, I wish to grab the value in the textbox and update certain records in a table using that value. The problem is that even when I type a value into the textbox...
  11. A

    DESPERATE: Need help with SQL!

    I'm back! Hope you all had a fantastic 4th of July weekend. Aaaand I still have this problem. I checked the name (I changed the name of the textbox in the 'other' tab of its properties to 'rating') but it doesn't seem to work. This textbox is on a report, by the way, not a form. I've grabbed...
  12. A

    DESPERATE: Need help with SQL!

    You're right, it's empty. How is it empty though, I enter text into it. I did make sure to tab out of the textbox and it still gave me the error. I deleted and readded the textbox too. Also, the msgbox command did in fact return "Contains Nothing". How odd. I succeeded in grabbing the value...
  13. A

    DESPERATE: Need help with SQL!

    Hmm...I tried both and neither worked. When I used the variable: SQL "UPDATE [Dummy Table] SET [Line Rating] = " & var & " WHERE [Sub Station] = 'crosby'" It gave the error "Invalid use of Null" and pointed to this line: var=me.rating When I used your line, it gave the error "Syntax error in...
  14. A

    DESPERATE: Need help with SQL!

    OK here I am again. What I actually need to do ultimately is grab the value from a text box and use that in this SQL statement. The name of the textbox in question is "rating". This is what I tried: var = Me.rating DoCmd.RunSQL "UPDATE [Dummy Table] SET [Line Rating] = var WHERE [Sub...
  15. A

    DESPERATE: Need help with SQL!

    Fantastic. Thank you so much sir. And your response was so speedy too!
Back
Top Bottom