dbTalk Databases Forums  

2007 Query

comp.databases.ms-access comp.databases.ms-access


Discuss 2007 Query in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Salad
 
Posts: n/a

Default Re: 2007 Query - 03-08-2008 , 05:50 PM






Vaudousi wrote:

Quote:
On 8 mar, 20:42, Salad <o... (AT) vinegar (DOT) com> wrote:

Vaudousi wrote:

On 6 mar, 19:27, Vaudousi <f... (AT) tele2 (DOT) fr> wrote:

Hi Salad

I am not a professional, so I say that with prudence. I think that
something is broken somewhere : in Access 2007 or more probably, in my
version.

Apparently, the subform (frmBirthDaySub is activated before the date
is set. I modified the Form_Load following your suggestion (adding a
line with MsgBox) :

Private Sub Form_Load()
CtlCalendar.Value = Date
'added for test
MsgBox "Month " & [Forms]![FrmBirthDay]![CtlCalendar].[Month] & _
vbNewLine & "Day " & [Forms]![FrmBirthDay]![CtlCalendar].[Day]
frmBirthDaySub.Requery
End Sub.

Running frmBirthDay : on 2003, the program stops, displays the MsgBox
and continues normally after clicking OK.
On 2007, it goes directly to "Enter a value of parameter"

Thanks for your help. I surrender.

Shame on you! Programmers don't surrender, they adjust!

I wish I could come up with the "solution" for you. I think at this
time I'll pop you over to
http://allenbrowne.com/ser-51.html

Most, or should I say many, of us don't use the ActiveX calendar. As
Allen noted "There are plenty of ActiveX control calendars, but they
have issues with versioning, broken references, and handling Nulls."

I suggest you check out the built in calendar Allen mentions that is
built in to A2007. You could check out the version:
syscmd(acSysCmdAccessVer)
and if it returns 11 or less, use your current control otherwise use the
new control in A2007 (I have NO expericient with it. Or check out the
code for getting the version at Allen's pagehttp://allenbrowne.com/ser-53code.html. Perhaps the built in calendar
will be sufficient.

If you want to look at other calendars I suggest you look in
GoogleGroups in the group comp.databases.ms-access. What I would do is
find one that you can modify to suit your needs and bypass the ActiveX
one. I have a calendar form I modified presents a From and a To
calendar for those times a person wants to select dates in a range.

Turn It Aroundhttp://www.youtube.com/watch?v=JYB_hvVBFYc


The problem is not with the ActiveX itself. I have it working on
another form in the same program on 2007. I suspect the combination
SubForm/Query.

Switching from this calendar to another one is also a capitulation.
Hi...Hi.
Hmmmm. I dropped a Calendar into Form1 and changed it's name to Cal1.
I then created a command button and entered for the OnClick code
MsgBox Me.cal1.Month

I dropped this form into Form2, created a command button and entered
MsgBox Me("Form1")!cal1.Month

Whichever command button I pressed, in form1 or form2, echoed 3 to me.

Now you said that when you did a msgbox you got a parameter message
instead. Maybe it doesn't recongnize the property.

Perhaps do what I did. Create a blank form. Drop in the calendar.
Change the name to name to something, create a command button to echo
the month (or day) and run it. If it errors, then open up the VBA
window and go into the object browser. I looked for MSACAL in
libraries. One of the properties was Day. I also saw Month and Year.

You could also enter
Stop
MsgBox Me.cal1.Month
and now run the form. I went into the Immediate window that also shows
the local values. Clicking on Me/Cal1/Object I say the properties of
Day,Month, and Year. I did this from A97 so chances are there may be
some differences.

But what if it doesn't see those properties? Did you check your
references to see if the calendar control is checked?

Since it works for you in another form I doubt I can suggest much more.
I'd probable do what I did and drop a form with the cal control, put
in a command button to do a messagebox, and then get into the debug
window and see what format you need to find that property. The object
browse should help.

Good luck



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.