2007 Query

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

    2007 Query

    Hi All

    Asking help again. I am a casual user of Access. I have a simple
    application which works correctly under Access 2003. I tried it under
    2007. One of the module refuses to work. I have :

    A table : PersonId, Name, Birthday
    ----
    A form (frmBirthDay) which includes ActiveX MonthView (ctlCalendar)
    and a subform (frmBirthDaySub ) which displays names and year of birth
    of people born on same day and month selected on the calendar. A
    module:

    Option Compare Database
    Option Explicit

    Private Sub cmdClose_Click( )
    DoCmd.Close
    End Sub

    Private Sub CtlCalendar_Dat eClick(ByVal DateClicked As Date)
    frmBirthDaySub. Requery
    End Sub

    Private Sub CtlCalendar_Sel Change(ByVal StartDate As Date, ByVal
    EndDate As Date, Cancel As Boolean)
    frmBirthDaySub. Requery
    End Sub

    Private Sub Form_Load()
    CtlCalendar.Val ue = Date
    frmBirthDaySub. Requery
    End Sub
    ----
    A select query (qryBirthDay) which has the following field :Name,
    A:Year(birthday ), Month(birthday) , Day(BirthDay)
    [Month(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Month]
    [Day(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Day]

    Under Access 2007, when I run the form (frmBirthDay), I get :

    Enter value of parameter
    Forms]![FrmBirthDay]![ctlCalendar].[Month, the same question for
    month....

    I spent 3 days fighting with this. I read the forum but did not find
    similar posts. I cannot figure out where is the problem.

    TKS AGN for helping.
  • Salad

    #2
    Re: 2007 Query

    Vaudousi wrote:
    Hi All
    >
    Asking help again. I am a casual user of Access. I have a simple
    application which works correctly under Access 2003. I tried it under
    2007. One of the module refuses to work. I have :
    >
    A table : PersonId, Name, Birthday
    ----
    A form (frmBirthDay) which includes ActiveX MonthView (ctlCalendar)
    and a subform (frmBirthDaySub ) which displays names and year of birth
    of people born on same day and month selected on the calendar. A
    module:
    >
    Option Compare Database
    Option Explicit
    >
    Private Sub cmdClose_Click( )
    DoCmd.Close
    End Sub
    >
    Private Sub CtlCalendar_Dat eClick(ByVal DateClicked As Date)
    frmBirthDaySub. Requery
    End Sub
    >
    Private Sub CtlCalendar_Sel Change(ByVal StartDate As Date, ByVal
    EndDate As Date, Cancel As Boolean)
    frmBirthDaySub. Requery
    End Sub
    >
    Private Sub Form_Load()
    CtlCalendar.Val ue = Date
    frmBirthDaySub. Requery
    End Sub
    ----
    A select query (qryBirthDay) which has the following field :Name,
    A:Year(birthday ), Month(birthday) , Day(BirthDay)
    [Month(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Month]
    [Day(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Day]
    >
    Under Access 2007, when I run the form (frmBirthDay), I get :
    >
    Enter value of parameter
    Forms]![FrmBirthDay]![ctlCalendar].[Month, the same question for
    month....
    >
    I spent 3 days fighting with this. I read the forum but did not find
    similar posts. I cannot figure out where is the problem.
    >
    TKS AGN for helping.
    What happens if you change
    Forms]
    to
    [Forms]
    ?


    Feuer Frei!

    Comment

    • Vaudousi

      #3
      Re: 2007 Query

      On 6 mar, 00:18, Salad <o...@vinegar.c omwrote:
      Vaudousi wrote:
      Hi All
      >
      Asking help again. I am a casual user of Access. I have a simple
      application which works correctly under Access 2003. I tried it under
      2007. One of the module refuses to work. I have :
      >
      A table : PersonId, Name, Birthday
      ----
      A form (frmBirthDay) which includes ActiveX MonthView (ctlCalendar)
      and a subform (frmBirthDaySub ) which displays names and year of birth
      of people born on same day and month selected on the calendar. A
      module:
      >
      Option Compare Database
      Option Explicit
      >
      Private Sub cmdClose_Click( )
      DoCmd.Close
      End Sub
      >
      Private Sub CtlCalendar_Dat eClick(ByVal DateClicked As Date)
      frmBirthDaySub. Requery
      End Sub
      >
      Private Sub CtlCalendar_Sel Change(ByVal StartDate As Date, ByVal
      EndDate As Date, Cancel As Boolean)
      frmBirthDaySub. Requery
      End Sub
      >
      Private Sub Form_Load()
      CtlCalendar.Val ue = Date
      frmBirthDaySub. Requery
      End Sub
      ----
      A select query (qryBirthDay) which has the following field :Name,
      A:Year(birthday ), Month(birthday) , Day(BirthDay)
      [Month(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Month]
      [Day(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Day]
      >
      Under Access 2007, when I run the form (frmBirthDay), I get :
      >
      Enter value of parameter
      Forms]![FrmBirthDay]![ctlCalendar].[Month, the same question for
      month....
      >
      I spent 3 days fighting with this. I read the forum but did not find
      similar posts. I cannot figure out where is the problem.
      >
      TKS AGN for helping.
      >
      What happens if you change
      Forms]
      to
      [Forms]
      ?
      >
      Feuer Frei!http://www.youtube.com/watch?v=nHWicNDkbpw
      Hi Salad

      Sorry, typo in my message, not in the real thing. I confirm that the
      whole procedure works on 2003. I copied it to another computer running
      2007 (with 2003 database format).

      It just does not work under 2007. I am very confused.

      Comment

      • Salad

        #4
        Re: 2007 Query

        Vaudousi wrote:
        On 6 mar, 00:18, Salad <o...@vinegar.c omwrote:
        >
        >>Vaudousi wrote:
        >>
        >>>Hi All
        >>
        >>>Asking help again. I am a casual user of Access. I have a simple
        >>>applicatio n which works correctly under Access 2003. I tried it under
        >>>2007. One of the module refuses to work. I have :
        >>
        >>>A table : PersonId, Name, Birthday
        >>>----
        >>>A form (frmBirthDay) which includes ActiveX MonthView (ctlCalendar)
        >>>and a subform (frmBirthDaySub ) which displays names and year of birth
        >>>of people born on same day and month selected on the calendar. A
        >>>module:
        >>
        >>>Option Compare Database
        >>>Option Explicit
        >>
        >>>Private Sub cmdClose_Click( )
        >> DoCmd.Close
        >>>End Sub
        >>
        >>>Private Sub CtlCalendar_Dat eClick(ByVal DateClicked As Date)
        >> frmBirthDaySub. Requery
        >>>End Sub
        >>
        >>>Private Sub CtlCalendar_Sel Change(ByVal StartDate As Date, ByVal
        >>>EndDate As Date, Cancel As Boolean)
        >> frmBirthDaySub. Requery
        >>>End Sub
        >>
        >>>Private Sub Form_Load()
        >> CtlCalendar.Val ue = Date
        >> frmBirthDaySub. Requery
        >>>End Sub
        >>>----
        >>>A select query (qryBirthDay) which has the following field :Name,
        >>>A:Year(birth day), Month(birthday) , Day(BirthDay)
        >>>[Month(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Month]
        >>>[Day(Birthday) criteria = Forms]![FrmBirthDay]![ctlCalendar].[Day]
        >>
        >>>Under Access 2007, when I run the form (frmBirthDay), I get :
        >>
        >>>Enter value of parameter
        >>>Forms]![FrmBirthDay]![ctlCalendar].[Month, the same question for
        >>>month....
        >>
        >>>I spent 3 days fighting with this. I read the forum but did not find
        >>>similar posts. I cannot figure out where is the problem.
        >>
        >>>TKS AGN for helping.
        >>
        >>What happens if you change
        > Forms]
        >>to
        > [Forms]
        >>?
        >>
        >>Feuer Frei!http://www.youtube.com/watch?v=nHWicNDkbpw
        >
        >
        Hi Salad
        >
        Sorry, typo in my message, not in the real thing. I confirm that the
        whole procedure works on 2003. I copied it to another computer running
        2007 (with 2003 database format).
        >
        It just does not work under 2007. I am very confused.
        Can't you pause, or step thru the code, and attempt to run the query in
        the debug window or perhaps in the query builder?

        You might have to rewrite the query.

        Can you create a cheap form that opens the calendar control and then
        attempting to run the query. Or attempt to see what
        [Forms]![FrmBirthDay]![ctlCalendar].[Day] or .[Month] is in the debug
        window?

        You might get some better responses if you posted the SQL statement. I
        had a hard time deciphering it...seemed like psuedo code.



        Comment

        Working...