Access Help

  cortez© 13:52 23 Feb 2007
Locked

Hi,

Have two quick questions

I have just come accross the calender v11 active x plugin. How do i make it so a selected date will be outputted to a say a text box?

I also have a a drop down box with several options available. If the user was to select a certain option from this list (e.g. "Other") how would i make a text box appear to the right of this in order for the user to enter a value for "other"......if that makes sense

Thanks for any input.

  silverous 14:17 23 Feb 2007

Which version of Office are you using? I'm on 2000 and can't see V11 calendar. Assuming it is the same as the V10.....

Right click on the calendar control, choose Build Event. It should take you into the code editor and it will give you an empty _Click() sub routine.

Inside that you need some code to the effect of:

Text1 = ActiveXCtl0.Value

where Text1 is the name of the textbox and ActiveXCt10 is the name of the calendar control.

For your second question, put the textbox to the right of the dropdown list.

For your second question, you'll need to add some code to the drop down box. Go into the code editor again (ALT + F11 should take you there) and add some code e.g.:

Private Sub List3_AfterUpdate()

If List3.Value = "Other" Then
Text5.Visible = True
Else
Text5.Visible = False
End If

End Sub

Now the problem will come if this form is based on a table - when you navigate through the records afterupdate won't be called. If you want to continue down this route let me know and I can help further if the above gets you started. I've got a working example of both saved which I can email.

  cortez© 14:55 23 Feb 2007

Hi,

I get an error when i try select a date using calender and it fails to work - not sure if its because im using access 2003.

I get a lot of errors too for the second bit :(

If you could email me the examples im sure id see what i have done wrong straight away.

Thanks

  silverous 16:34 23 Feb 2007

What errors are you getting?

Have you changed the code so that the names reflect the names of your objects?

You can email me the database if you like.

  Chris the Ancient 16:39 23 Feb 2007

There are also some good guides on access calendar work at

click here

  cortez© 17:22 23 Feb 2007

@silverous

yer i have changed the names of objects.

@Chris

nice link, thanks.

  silverous 17:37 23 Feb 2007

So....

What errors are you getting?

  cortez© 18:41 23 Feb 2007

Hi,

Here is the database - i have included two forms relating to the above two examples. Can't get it to work :/

If i change the event for the calender to anything other than "_updated" i get an error saying i can't assign a click event to the calener?????

The dropdown just doesnt work for some reason.

Here is the database (MS access 2003 file, 200 KB)
click here

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

How secure is your Wi-Fi?

AMD vs Intel: we put the most powerful desktops for designers and artists head-to-head

iPhone tips & tricks

Les meilleurs ordinateurs portables 2017