473,473 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding a Calendar to an Access Form

47 New Member
Hi,

Here I come again with my silly questions.... I am now working on a calendar control and i am able to put in the control and also link it to a field, but i keep getting a error message in VB Script as "You can't assign a value to this object". The code that i have written is :
Expand|Select|Wrap|Line Numbers
  1. Private Sub DateCBox_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2. ocxCalendar.Visible = True
  3. ocxCalendar.SetFocus
  4. If Not IsNull(DateCBox) Then
  5.     ocxCalendar.Value = DateCBox.Value
  6. Else
  7.     ocxCalendar.Value = Date
  8. End If
  9. End Sub
Where ocxcalendar is the name of the calendar control and DateCBox is the name of the combo box where the calendar is linked ...
Mar 17 '08 #1
1 1741
neosam
47 New Member
Hi,

Here I come again with my silly questions.... I am now working on a calendar control and i am able to put in the control and also link it to a field, but i keep getting a error message in VB Script as "You can't assign a value to this object". The code that i have written is :
Expand|Select|Wrap|Line Numbers
  1. Private Sub DateCBox_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2. ocxCalendar.Visible = True
  3. ocxCalendar.SetFocus
  4. If Not IsNull(DateCBox) Then
  5.     ocxCalendar.Value = DateCBox.Value
  6. Else
  7.     ocxCalendar.Value = Date
  8. End If
  9. End Sub
Where ocxcalendar is the name of the calendar control and DateCBox is the name of the combo box where the calendar is linked ...

Got it thanks!!!!!!!!
Mar 17 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: TnCoder | last post by:
Hi; I just moved from vb 6.0 to vb.net. I am trying to add MS Calendar control to my toolbox. After the control is added, it is not enabled. Is there dll I have to add? Can anyone who could give...
2
by: dixie | last post by:
I have a report which is printed daily. It is a list of people. A person can be put on this list for one day, which is easyily achieved from a simple form. My problem is that a person can also...
1
by: Marco Simone | last post by:
Hi, If someone can answer how to add calendar control on form, where you can choose date. I think there is Calendar control in ActiveX add in, but I don't know how to implement it. Thanks...
8
by: Shyguy | last post by:
Is it possible to create a calendar that shows previous input data and also allows for input of new data?
3
by: Matthew | last post by:
I currently have a form in MS Access that has certain combo boxes which specify criteria in order to run a query based on that criteria. I want to add to this, a calendar from which a user will be...
3
by: Dino M. Buljubasic | last post by:
Is it possible to add my own property to a control? For example, since MainMenu control does not have Background property, can I add my own and use it to set the color. Thank you, Dino --
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
14
by: magmike | last post by:
Can I do anything with the calendar buttons? I want to display a number on the buttons. I'm using the calendar control on a form that sets a call back date and time. The user can click on the...
1
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.