By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

2007 Query

P: n/a
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_DateClick(ByVal DateClicked As Date)
frmBirthDaySub.Requery
End Sub

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

Private Sub Form_Load()
CtlCalendar.Value = 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.
Mar 5 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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_DateClick(ByVal DateClicked As Date)
frmBirthDaySub.Requery
End Sub

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

Private Sub Form_Load()
CtlCalendar.Value = 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
Mar 5 '08 #2

P: n/a
On 6 mar, 00:18, Salad <o...@vinegar.comwrote:
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_DateClick(ByVal DateClicked As Date)
frmBirthDaySub.Requery
End Sub
Private Sub CtlCalendar_SelChange(ByVal StartDate As Date, ByVal
EndDate As Date, Cancel As Boolean)
frmBirthDaySub.Requery
End Sub
Private Sub Form_Load()
CtlCalendar.Value = 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.
Mar 6 '08 #3

P: n/a
Vaudousi wrote:
On 6 mar, 00:18, Salad <o...@vinegar.comwrote:
>>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_DateClick(ByVal DateClicked As Date)
frmBirthDaySub.Requery
End Sub
>>>Private Sub CtlCalendar_SelChange(ByVal StartDate As Date, ByVal
EndDate As Date, Cancel As Boolean)
frmBirthDaySub.Requery
End Sub
>>>Private Sub Form_Load()
CtlCalendar.Value = 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.
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.

Mar 6 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.