Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Location
    Jacksonville, North Carolina, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Action (2003 11.6566.6568)

    Please see attached. Thank you for any help!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Action (2003 11.6566.6568)

    Instead of using an expression involving Format in the Column Heading field of the crosstab query, use DateSerial, e.g.

    DateSerial(Year([DateField]), Month([DateField]), 1)

    If you want to create a report based on a crosstab query, you'll enter the wonderful world of dynamic crosstab reports. Do a search for those keywords in this forum, or go directly to <post#=35485>post 35485</post#>, <post#=134439>post 134439</post#> or <post#=248210>post 248210</post#>.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2003
    Location
    Jacksonville, North Carolina, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Action (2003 11.6566.6568)

    Thanks!! The DateSerial seems to work however I would prefer to see the column heading in the format of Apr 2005 instead of 4/1/2005. How do I accomplish?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Action (2003 11.6566.6568)

    I don't think that's possible in a query. In a report, you could use VBA code to display the column headings in the format you want.

  5. #5
    2 Star Lounger
    Join Date
    Apr 2003
    Location
    Jacksonville, North Carolina, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Action (2003 11.6566.6568)

    Again, Thanks!!

    Can you address page 2 of the original attachment?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Action (2003 11.6566.6568)

    Sorry, I hadn't seen that there was a second page.

    You can use the After Update event of the combo box. First, determine which column of the combo box contains the Yes/No for Additional information required, including hidden (zero width) columns. Let's say it is the 4th column. Code could look like this - you must, of course, substitute the actual names:

    Private Sub Disease_AfterUpdate()
    If Me.Disease.Column(3) = True Then
    Me.SeroType.SetFocus
    Else
    Me.DateOfOnset.SetFocus
    End If
    End Sub

    Columns are counted starting at zero, so the 4th column is Column(3).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •