query how to

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Piotr

    #1

    query how to

    Hi I need to perform following query

    Richard 3
    Damian 4

    I need to get result

    Richard
    Richard
    Richard
    Damian
    Damian
    Damian
    Damian

    regards
    Peter

  • Rick Brandt

    #2
    Re: query how to

    "Piotr" <hokah@wp.pl> wrote in message
    news:1134723397 .126737.238450@ g44g2000cwa.goo glegroups.com.. .[color=blue]
    > Hi I need to perform following query
    >
    > Richard 3
    > Damian 4
    >
    > I need to get result
    >
    > Richard
    > Richard
    > Richard
    > Damian
    > Damian
    > Damian
    > Damian[/color]

    Not sure how a query could do that. Pretty easy in a Report though. Would that
    suit your purpose?

    In a report you could dim an integer variable (cntr) at the top of the report
    module and then have code like this in the format event of the detail section...

    If cntr < (Me!NumField - 1) Then
    Me.MoveLayout = True
    Me.PrintSection = True
    Me.NextRecord = False
    cntr = cntr + 1
    Else
    cntr = 0
    End If

    --
    I don't check the Email account attached
    to this message. Send instead to...
    RBrandt at Hunter dot com


    Comment

    • Mike Preston

      #3
      Re: query how to

      On 16 Dec 2005 00:56:37 -0800, "Piotr" <hokah@wp.pl> wrote:
      [color=blue]
      >Hi I need to perform following query
      >
      >Richard 3
      >Damian 4[/color]

      Is the above two separate fields or it is one field where you have
      both a name and a number in it?
      [color=blue]
      >I need to get result
      >
      >Richard
      >Richard
      >Richard
      >Damian
      >Damian
      >Damian
      >Damian[/color]

      Can you explain the context?

      mike

      Comment

      • Piotr

        #4
        Re: query how to

        Two separate fields string and number.

        Comment

        • Mike Preston

          #5
          Re: query how to

          On 18 Dec 2005 23:26:46 -0800, "Piotr" <hokah@wp.pl> wrote:
          [color=blue]
          >Two separate fields string and number.[/color]

          OK, exactly "where" do you need to get this result? A recordset? A
          report? A table? A listbox? A combobox? Curious people want to know!

          mike

          Comment

          • Piotr

            #6
            Re: query how to

            query to be able to use it in excel

            Comment

            • Mike Preston

              #7
              Re: query how to

              On 19 Dec 2005 04:51:44 -0800, "Piotr" <hokah@wp.pl> wrote:
              [color=blue]
              >query to be able to use it in excel[/color]

              You'll have to set up a form, then a command button and finally some
              vba to loop the recordset and output a new recordset/table.

              mike

              Comment

              Working...