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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Robeen

    Help Restricting Rows in Result Set.

    Hi CCLINT, This definitely works for that one payment code. Thanks! That's unqualified. SELECT [StudentDataTest].[Folio], [Receipts].[ Code], SUM([Receipts].[Amount]) AS Total FROM [StudentDataTest] INNER JOIN [Receipts] ON [StudentDataTest].[Folio]=[Receipts].[Folio] WHERE [Receipts].[ Code]...
  2. Robeen

    Help Restricting Rows in Result Set.

    Thanks Trendsetter, I'm sorry if I miscommunicated my request. What I was hoping to get was a way to get the rows I want with the SQL alone. I want to only see those Sum(Receipts.Amount) which are less than 320 if the Receipts.Code Like("TUI%") When I open my recordset with the...
  3. Robeen

    Help Restricting Rows in Result Set.

    Sorry - For some reason the last line of my query showed up with an error - here it is again without that weird last character - " [Code] " - which I get when I try & enter the word 'Code' with square brackets [] around it. SELECT [StudentDataTest].[FOLIO], [Receipts].[ Code]...
  4. Robeen

    Help Restricting Rows in Result Set.

    MS Access 2000. I have this Query: SELECT [StudentDataTest].[FOLIO], [Receipts].[ Code], SUM([Receipts.Amount]) AS Total FROM StudentDataTest INNER JOIN Receipts ON [StudentDataTest].[FOLIO]=[Receipts].[Folio] GROUP BY [StudentDataTest].[FOLIO], [Receipts].[Code]; Folio: is a Student's Unique...
  5. Robeen

    Help Opening Multiple Recordsets.

    I agree - I just felt uncomfortable putting the code up repeatedly. Once it is figured out the working structure can be posted. Please email me - so I'll have an email address for you. Thanks, Robeen
  6. Robeen

    Help Opening Multiple Recordsets.

    Hi CCLINT. I'm going to work on this a little more. May I email you after I've made some progress - maybe next week or later? If so - please email me at rsengupta@lifetouch.com. I don't know about pasting long code here . . . Robeen
  7. Robeen

    Help Opening Multiple Recordsets.

    Hi CCLINT, I took your suggestion about re-writing my select statement to get all my totals in the first recordset. Here's what it looks like: SELECT StudentDataTest.FOLIO, Receipts.Code, SUM([Receipts.Amount]) AS SubTotal FROM StudentDataTest INNER JOIN Receipts ON StudentDataTest.FOLIO =...
  8. Robeen

    Help Opening Multiple Recordsets.

    Thanks CCLINT! You know - it's been working again. I commented these two lines out: 'Set rstFolio = Nothing 'Set rstCode = Nothing Trouble is - now I'm not closing these recordsets at all. I'm trying to find out what the consequences are of leaving the recordsets open like that. I do have a...
  9. Robeen

    Problem With 'Run-Time Error 3074'.

    Thanks ddc821! Are you recommending that I do not have two active recordsets going at the same time and instead get all my unique IDs into an array variable before opening the second recordset? If so, I had considered that - and I might end up doing that eventually - the thing is I like the...
  10. Robeen

    Problem With 'Run-Time Error 3074'.

    vb 6.0 - MSAccess 2000. I'm using two recordsets as follows: rst1 - to Get all the [unique] IDs from a Master Table - using an SQL statement as the DataSource. Then I'm Looping through the IDs one at a time & for each ID I'm opening a 2nd Recordset with a different SQL statement as its...
  11. Robeen

    Help Opening Multiple Recordsets.

    Thanks CCLINT, I am still getting this message: "Run-Time Error 3704 Operation is not allowed when the object is closed." as soon as I try & do a Move First on the second Recordset -"rstCode.MoveFirst". The odd thing is that I was able to run this successfully before making...
  12. Robeen

    Help Opening Multiple Recordsets.

    Actually - This: 'Set cnn = Nothing Is Active: Set cnn = Nothing Sorry - I tried commenting it out to see if the fact that the conection was 'Nothinged' was what was causing the '3074'. Robin
  13. Robeen

    Help Opening Multiple Recordsets.

    Hi CClint! Here's the ExecuteSQL Module: Public Function ExecuteSQL(ByVal SQL _ As String, MsgString As String) _ As ADODB.Recordset 'Executes SQL and returns Recordset & SQL Message. Dim cnn As ADODB.Connection Dim rst As ADODB.Recordset Dim sTokens() As String...
  14. Robeen

    Help Opening Multiple Recordsets.

    Hi! VB 6.0 - MS Access 2000. I'm trying to use two recordsets simultaneously as follows: Set rstFolio = New ADODB.Recordset Set rstCode = New ADODB.Recordset strSQLText = "Select [Folio] from [StudentDataTest] order by [Folio]" Set rstFolio.DataSource = ExecuteSQL(strSQLText...
  15. Robeen

    Help - ByRef argument Type Mismatch.

    Thanks guys! I come from a PowerBuilder background where you can declare like that . . . how silly of me to expect it to be similar in VB . . . If something's that easy - would it be a Microsoft product?? :) [oooooof!!! where did that come from???] I've made the changes & everything's fine...
  16. Robeen

    Help - ByRef argument Type Mismatch.

    Here's [in my opinion] the pertinent code: 1. Clicked event that Calls the Function which is in a bas module. Private Sub cmdDefaulters_Click() Dim strSQLText, strMsgText, strFolio, StrCode As String Dim curAmount, curAmountOwed As Currency strCnn = ConnectString 'ConnectString is a function...
  17. Robeen

    Global Variables.

    In VB 6.0 - how do I set up Global Variables? For instance - if I need a UserID to be stored throughout the session - after a user has logged in - where can I declare the Variable so that once the User has logged in I can check who the user is at any given point in the Application & decide if...
  18. Robeen

    How to find all TextBox controls on a form?

    Thank you so much, guys! I'll give your suggestoins a try next week! I appreciate your help. I could have looked for a long time in the Help Files and not found the answer. I sometimes wonder if I'm alone in feeling that the Microsoft VB Help Files are often difficult to extract help from. Of...
  19. Robeen

    How to find all TextBox controls on a form?

    I want to write a 'Clear All' function that can be called from anywhere in my application that will Loop through all the controls on the Form from which the function is called, identify which ones are [for instance] TextBoxes, ListBoxes & ComboBoxes and then clear their contents - setting them...
  20. Robeen

    Help Validating Strings & Numbers.

    Thanks jtran34! I wrote a function that is available to every Form - That validates for Text Only - With a For Next Loop based on the length of the string - That checks that the ASCII value of each character is in 65-90 or 97-122 - And returns the offending character [if any] to the calling...

Part and Inventory Search

Back
Top