Search results

  1. T

    Select Top (variable) - Is this possible?

    Thanks Banana. I had also tried that, but with the same result. Here is the actual code: strSQL = "SELECT TOP " & varRecord & " tblTemp.[Order Date Year Quarter], " & _ Everything works fine when I use an actual number, so I know the rest of the code is good. Any other suggestions?
  2. T

    Select Top (variable) - Is this possible?

    Hi all, I have exhausted my search on this question to no avail, so I am turning to the true experts. Is it possible to use a variable, or alternatively, a form field value, in the SQL Select Top n statement, and if so, what is the appropriate syntax? I tried using "Select Top varRecords ..."...
  3. T

    Command Button - Find Record - Popup Form

    I have a popup form that opens from a command button on a switchboard. I placed a command button with the Find Record on the popup form. The problem is, the 'Look In:' box on the 'Find and Replace' screen references the switchboard form, not the popup form. If I change the popup property to...
  4. T

    Compile error: Else without If

    DJkarl & Phatnq2002... thanks for the replies. I switched to Bob's solution of using the Select Case, which worked perfectly, but I appreciate the answers to what I was doing wrong with the If Then Else syntax.
  5. T

    Compile error: Else without If

    Hi Bob, That works... now I just need to figure out why it is not picking up the public variable. Thanks for the quick reply.
  6. T

    Compile error: Else without If

    I simply cannot see what I have done wrong here: Private Sub Form_Load() txtCheck.Value = strCheckMark If txtCheck.Value = "A" Then _ lblTitle.Caption = "Amended Entries Completed - Change Flag Form" ElseIf txtCheck.Value = "N" Then _ lblTitle.Caption = "Entry...
  7. T

    Counts vs Grouping vs Rollup

    Oops! That should have read: The results of your first query would look something like: Name|EmployeeDED |EmployerDED|AdminDED |Counter Joe| $10| $20| $30| 1 Bill | $15| $20| $25| 1
  8. T

    Counts vs Grouping vs Rollup

    Could you not just add another column to your first query, eg. Counter: 1, and then use sum([Counter]) in your second query? The results of your first query would look something like: Name|EmployeeDED |EmployerDED|AdminDED Joe| $10| $20| $30| 1 Bill | $15| $20| $25| 1 Stu
Back
Top Bottom